remove change to static file
This commit is contained in:
parent
84fc6bf873
commit
b39d4a0ea8
|
@ -45,7 +45,7 @@
|
|||
"paths":[
|
||||
{
|
||||
"path": "/",
|
||||
"upstreams": ["http://localhost:4200"],
|
||||
"upstreams": ["http://192.168.12.174:9880"],
|
||||
"directives":["HostSchemas $target"]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue