feat(controller,app): add app module

This commit is contained in:
2023-03-28 20:43:45 +02:00
parent 3d0b0102c2
commit e832b7dedd
21 changed files with 542 additions and 397 deletions

View File

@ -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 {

View File

@ -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) {