From 6a62f704e2e8e2f7bebabaf9095ce24f382d2ab2 Mon Sep 17 00:00:00 2001
From: Rahul Somasundaram <Rahul.Somasundaram@checkpt.com>
Date: Tue, 4 Oct 2022 11:01:21 +0530
Subject: [PATCH] added h3 header

---
 internal/home/control.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/internal/home/control.go b/internal/home/control.go
index 54d2efb1..68892436 100644
--- a/internal/home/control.go
+++ b/internal/home/control.go
@@ -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")