diff --git a/modules/http_proxy/http_proxy_js_request.go b/modules/http_proxy/http_proxy_js_request.go index 76ed8f09..b4dc1d93 100644 --- a/modules/http_proxy/http_proxy_js_request.go +++ b/modules/http_proxy/http_proxy_js_request.go @@ -29,7 +29,7 @@ type JSRequest struct { bodyRead bool } -var header_regexp = regexp.MustCompile(`(.*?): (.*)`) +var header_regexp = regexp.MustCompile(`^\s*(.*?)\s*:\s*(.*)\s*$`) func NewJSRequest(req *http.Request) *JSRequest { headers := ""