added h3 header

This commit is contained in:
Rahul Somasundaram 2022-10-04 11:01:21 +05:30
parent bf792b83f6
commit 6a62f704e2
No known key found for this signature in database
GPG key ID: AA8F0B27E83147BD

View file

@ -346,6 +346,11 @@ func handleHTTPSRedirect(w http.ResponseWriter, r *http.Request) (ok bool) {
Scheme: aghhttp.SchemeHTTP,
Host: r.Host,
}
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"`)
}
w.Header().Set("Access-Control-Allow-Origin", originURL.String())
w.Header().Set("Vary", "Origin")