From b7e815483e7fe60d87019f3b64ad557afa5b6814 Mon Sep 17 00:00:00 2001 From: Rahul Somasundaram Date: Wed, 5 Oct 2022 18:27:01 +0530 Subject: [PATCH] referred https port from config --- internal/home/control.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/home/control.go b/internal/home/control.go index 68892436..62a132c2 100644 --- a/internal/home/control.go +++ b/internal/home/control.go @@ -348,7 +348,8 @@ func handleHTTPSRedirect(w http.ResponseWriter, r *http.Request) (ok bool) { } if config.DNS.ServeHTTP3 { - w.Header().Set("Alt-Svc", `h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"`) + altSvc := fmt.Sprintf(`h3=":%[1]v"; ma=2592000,h3-29=":%[1]v"; ma=2592000,h3-Q050=":%[1]v";ma=2592000,h3-Q046=":%[1]v"; ma=2592000,h3-Q043=":%[1]v"; ma=2592000,quic=":%[1]v"; ma=2592000; v="46,43"`, config.TLS.PortHTTPS) + w.Header().Set("Alt-Svc", altSvc) } w.Header().Set("Access-Control-Allow-Origin", originURL.String())