diff --git a/config.json b/config.json index 4aa87b2..7ee5f70 100644 --- a/config.json +++ b/config.json @@ -45,7 +45,7 @@ "paths":[ { "path": "/", - "upstreams": ["http://localhost:4200"], + "upstreams": ["http://192.168.12.174:9880"], "directives":["HostSchemas $target"] }, { diff --git a/server/directive.go b/server/directive.go index 8c659a1..ace6f8f 100644 --- a/server/directive.go +++ b/server/directive.go @@ -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() }