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":[ "paths":[
{ {
"path": "/", "path": "/",
"upstreams": ["http://localhost:4200"], "upstreams": ["http://192.168.12.174:9880"],
"directives":["HostSchemas $target"] "directives":["HostSchemas $target"]
}, },
{ {

View File

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