Original post

proxy := httputil.ReverseProxy{Director: func(r *http.Request) { r.Host = u.Host r.URL.Host = u.Host r.URL.Scheme = u.Scheme r.Header.Set(“X-Forwarded-Host”, req.Header.Get(“Host”)) }}

proxy.ServeHTTP(res, req)

^ Image upload requests fail with this and response with a 413 Request Entity Too Large

submitted by /u/snapkast
[link] [comments]