Browse Source

prevent http->https redirection to port 0

(this happens when using unix sockets)
master
forest 2 months ago
parent
commit
1a99c8cdd7
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      modules/caddyhttp/autohttps.go

+ 2
- 1
modules/caddyhttp/autohttps.go View File

@ -398,7 +398,8 @@ func (app *App) makeRedirRoute(redirToPort uint, matcherSet MatcherSet) Route {
if redirToPort != uint(app.httpPort()) &&
redirToPort != uint(app.httpsPort()) &&
redirToPort != DefaultHTTPPort &&
redirToPort != DefaultHTTPSPort {
redirToPort != DefaultHTTPSPort &&
redirToPort != 0 {
redirTo += ":" + strconv.Itoa(int(redirToPort))
}


Loading…
Cancel
Save