remove change to static file

This commit is contained in:
程广 2023-12-25 13:34:29 +08:00
parent 84fc6bf873
commit b39d4a0ea8
2 changed files with 6 additions and 7 deletions

View File

@ -45,7 +45,7 @@
"paths":[
{
"path": "/",
"upstreams": ["http://localhost:4200"],
"upstreams": ["http://192.168.12.174:9880"],
"directives":["HostSchemas $target"]
},
{

View File

@ -3,7 +3,6 @@ package server
import (
"fmt"
"net/http"
"path/filepath"
"strings"
"git.pyer.club/kingecg/gologger"
@ -37,12 +36,12 @@ var Gzip_Response Directive = func(args ...string) Middleware {
return func(w http.ResponseWriter, r *http.Request, next func()) {
l := gologger.GetLogger("Directive")
l.Debug("Gzip-Response")
if filepath.Ext(r.URL.Path) != "" {
ctx := r.Context()
m := ctx.Value(RequestCtxKey("data")).(map[string]interface{})
m["Tg"] = "gzip"
// if filepath.Ext(r.URL.Path) != "" {
ctx := r.Context()
m := ctx.Value(RequestCtxKey("data")).(map[string]interface{})
m["Tg"] = "gzip"
}
// }
next()
}