remove change to static file
This commit is contained in:
parent
84fc6bf873
commit
b39d4a0ea8
|
@ -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"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue