remove csp shit
Anirudh Oppiliappan x@icyphox.sh
Wed, 21 Jun 2023 21:30:21 +0300
1 files changed,
0 insertions(+),
8 deletions(-)
jump to
M
web.go
→
web.go
@@ -2679,13 +2679,6 @@ time.Sleep(50 * time.Minute)
} } -func addcspheaders(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Security-Policy", "default-src cdn.icyphox.sh; script-src 'self'; connect-src 'self'; style-src 'self' cdn.icyphox.sh; img-src 'self'; media-src 'self'; report-uri /csp-violation") - next.ServeHTTP(w, r) - }) -} - func emuinit() { var emunames []string dir, err := os.Open(dataDir + "/emus")@@ -2777,7 +2770,6 @@ h()
} mux := mux.NewRouter() - mux.Use(addcspheaders) mux.Use(login.Checker) mux.Handle("/api", login.TokenRequired(http.HandlerFunc(apihandler)))