Files
Amir Raminfar ba32d125ac Tries to inline favicon to fix #1714 (#1717)
* Tries to inline favicon to fix #1714

* Updates go tests
2022-04-16 14:55:34 -07:00

13 lines
386 B
Go

package web
import (
"net/http"
)
func cspHeaders(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Security-Policy", "default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; manifest-src 'self'; connect-src 'self' api.github.com;")
next.ServeHTTP(w, r)
})
}