mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-25 06:56:32 +08:00
feat: change default proxy.conf (#8971)
This commit is contained in:
parent
24d909d285
commit
8b9337b45a
3 changed files with 7 additions and 4 deletions
|
|
@ -7,6 +7,7 @@ location ^~ /test {
|
|||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
add_header X-Cache $upstream_cache_status;
|
||||
|
|
|
|||
|
|
@ -8,8 +8,5 @@ var IndexHtml embed.FS
|
|||
//go:embed assets/*
|
||||
var Assets embed.FS
|
||||
|
||||
//go:embed index.html
|
||||
var IndexByte []byte
|
||||
|
||||
//go:embed favicon.png
|
||||
var Favicon embed.FS
|
||||
|
|
|
|||
|
|
@ -56,7 +56,12 @@ func CheckSecurity(c *gin.Context) bool {
|
|||
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)
|
||||
data, err := web.IndexHtml.ReadFile("index.html")
|
||||
if err != nil {
|
||||
c.String(http.StatusInternalServerError, "index.html not found")
|
||||
return
|
||||
}
|
||||
_, _ = c.Writer.Write(data)
|
||||
c.Writer.Flush()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue