all repos — homestead @ b38e78e775d934fbfd3303b635042d98cac57891

Code for my website

fix redirect loops on non-standard ports

Alan Pearce
commit

b38e78e775d934fbfd3303b635042d98cac57891

parent

87e0a64c1a43f07f177a090298e60b730ad9a58f

1 file changed, 3 insertions(+), 1 deletion(-)

jump to
M internal/server/server.gointernal/server/server.go
@@ -61,13 +61,15 @@ } else {
config.Domains = []string{runtimeConfig.ListenAddress} } scheme := "http" + port := runtimeConfig.Port if runtimeConfig.TLS { scheme = "https" + port = runtimeConfig.TLSPort } config.BaseURL = cfg.URL{ URL: &url.URL{ Scheme: scheme, - Host: runtimeConfig.ListenAddress, + Host: net.JoinHostPort(config.Domains[0], strconv.Itoa(port)), }, } }