Skip to content

Commit

Permalink
referred https port from config
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrahul96 committed Oct 5, 2022
1 parent 6a62f70 commit b7e8154
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/home/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit b7e8154

Please sign in to comment.