7// Set some http headers that should prevent potential abuse. Better safe than sorry.
8func SafeHeaders(fn http.Handler) http.Handler {
9 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
11 h.Set("X-Frame-Options", "deny")
12 h.Set("X-Content-Type-Options", "nosniff")
13 h.Set("Content-Security-Policy", "default-src 'self' 'unsafe-inline' data:")
14 h.Set("Referrer-Policy", "same-origin")