1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 00:09:16 +08:00

fix(system): Fix Cloudflare Proxy Access Issue with 1Panel When Secure Entry Is Enabled (#7458)

This commit is contained in:
zhengkunwang 2024-12-20 11:03:49 +08:00 committed by GitHub
parent 3396a5ffea
commit 6683696032
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,9 +28,9 @@ var (
)
func toIndexHtml(c *gin.Context) {
c.Writer.Header().Set("Content-Type", "text/html; charset=utf-8")
c.Writer.WriteHeader(http.StatusOK)
_, _ = c.Writer.Write(web.IndexByte)
c.Writer.Header().Add("Accept", "text/html")
c.Writer.Flush()
}
@ -131,9 +131,9 @@ func setWebStatic(rootRouter *gin.RouterGroup) {
handleNoRoute(c)
return
}
c.Writer.Header().Set("Content-Type", "text/html; charset=utf-8")
c.Writer.WriteHeader(http.StatusOK)
_, _ = c.Writer.Write(web.IndexByte)
c.Writer.Header().Add("Accept", "text/html")
c.Writer.Flush()
})
}