From 1998b62ab9a3ae526d4b4ad36dcb86593c03c6cd Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Mon, 21 Aug 2023 15:26:25 +0800 Subject: [PATCH] fix --- proxyserver/main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/proxyserver/main.go b/proxyserver/main.go index 811f6476..49025cf6 100644 --- a/proxyserver/main.go +++ b/proxyserver/main.go @@ -81,6 +81,12 @@ func main() { fs := http.FileServer(http.Dir(vueBuild)) indexHtmlPath := vueBuild + "/index.html" mux.Handle("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + + err := r.ParseMultipartForm(100 << 20) + if err != nil { + log.Println(err) + } + if strings.HasPrefix(r.URL.Path, "/api/") { // 对/api开头的请求进行反向代理 proxy := httputil.NewSingleHostReverseProxy(apiURL)