Commit bc8bc048 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

Update WafLogController to set request URL scheme in proxy handling, ensuring...

Update WafLogController to set request URL scheme in proxy handling, ensuring correct protocol usage for WAF log requests.
parent 81292444
......@@ -32,6 +32,7 @@ func (c *WafLogController) WafLogProxy(ctx *gin.Context) {
proxy := httputil.NewSingleHostReverseProxy(remoteUrl)
proxy.Director = func(req *http.Request) {
req.URL.Scheme = remoteUrl.Scheme
req.URL.Path = strings.Replace(req.URL.Path, "/api/v2/containerSec/waf", "/api/v2/waf", 1)
req.URL.RawQuery = ctx.Request.URL.RawQuery
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment