Commit 556a6171 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

Update WafLogController to use 'region_code' query parameter instead of...

Update WafLogController to use 'region_code' query parameter instead of 'region' for improved clarity in WAF log proxy handling.
parent 93b57d55
...@@ -21,7 +21,7 @@ func NewWafLogController(regionUrlMap map[string]string) *WafLogController { ...@@ -21,7 +21,7 @@ func NewWafLogController(regionUrlMap map[string]string) *WafLogController {
} }
func (c *WafLogController) WafLogProxy(ctx *gin.Context) { func (c *WafLogController) WafLogProxy(ctx *gin.Context) {
region := ctx.Query("region") region := ctx.Query("region_code")
remoteUrl, err := url.Parse(c.regionUrlMap[region]) remoteUrl, err := url.Parse(c.regionUrlMap[region])
if err != nil { if err != nil {
ctx.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) ctx.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
......
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