Skip to content

Commit

Permalink
fix(system): Fix Cloudflare Proxy Access Issue with 1Panel When Secur…
Browse files Browse the repository at this point in the history
…e Entry Is Enabled (#7458)
  • Loading branch information
zhengkunwang223 authored Dec 20, 2024
1 parent 3396a5f commit 6683696
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/init/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down Expand Up @@ -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()
})
}
Expand Down

0 comments on commit 6683696

Please sign in to comment.