feat(controller,app): add app module
This commit is contained in:
@ -3,7 +3,7 @@ package proxy
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"forge.cadoles.com/arcad/edge/pkg/proxy/wildcard"
|
||||
"forge.cadoles.com/Cadoles/emissary/internal/proxy/wildcard"
|
||||
)
|
||||
|
||||
func FilterHosts(allowedHostPatterns ...string) Middleware {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"net/url"
|
||||
"sort"
|
||||
|
||||
"forge.cadoles.com/arcad/edge/pkg/proxy/wildcard"
|
||||
"forge.cadoles.com/Cadoles/emissary/internal/proxy/wildcard"
|
||||
"gitlab.com/wpetit/goweb/logger"
|
||||
)
|
||||
|
||||
@ -17,6 +17,7 @@ func RewriteHosts(mappings map[string]*url.URL) Middleware {
|
||||
}
|
||||
|
||||
sort.Strings(patterns)
|
||||
reverse(patterns)
|
||||
|
||||
return func(h http.Handler) http.Handler {
|
||||
fn := func(w http.ResponseWriter, r *http.Request) {
|
||||
|
Reference in New Issue
Block a user