fix(module,app): handle hosts without port
Some checks failed
arcad/emissary/pipeline/head There was a failure building this commit
Some checks failed
arcad/emissary/pipeline/head There was a failure building this commit
This commit is contained in:
parent
2e1ee44e6a
commit
06b1235707
@ -202,10 +202,7 @@ func unexpectedHostRedirect(hostTarget string, acceptedHostPatterns ...string) f
|
||||
fn := func(w http.ResponseWriter, r *http.Request) {
|
||||
host, port, err := net.SplitHostPort(r.Host)
|
||||
if err != nil {
|
||||
logger.Error(r.Context(), "could not split host/port", logger.E(errors.WithStack(err)))
|
||||
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
|
||||
|
||||
return
|
||||
host = r.Host
|
||||
}
|
||||
|
||||
matched := wildcard.MatchAny(host, acceptedHostPatterns...)
|
||||
|
Loading…
Reference in New Issue
Block a user