diff --git a/ui/feed_icon.go b/ui/feed_icon.go index 4b5f30f7..66c47075 100644 --- a/ui/feed_icon.go +++ b/ui/feed_icon.go @@ -27,6 +27,7 @@ func (h *handler) showIcon(w http.ResponseWriter, r *http.Request) { } response.New(w, r).WithCaching(icon.Hash, 72*time.Hour, func(b *response.Builder) { + b.WithHeader("Content-Security-Policy", `default-src 'self'`) b.WithHeader("Content-Type", icon.MimeType) b.WithBody(icon.Content) b.WithoutCompression() diff --git a/ui/proxy.go b/ui/proxy.go index 0c422437..0f7630ce 100644 --- a/ui/proxy.go +++ b/ui/proxy.go @@ -67,6 +67,7 @@ func (h *handler) imageProxy(w http.ResponseWriter, r *http.Request) { etag := crypto.HashFromBytes(decodedURL) response.New(w, r).WithCaching(etag, 72*time.Hour, func(b *response.Builder) { + b.WithHeader("Content-Security-Policy", `default-src 'self'`) b.WithHeader("Content-Type", resp.Header.Get("Content-Type")) b.WithBody(resp.Body) b.WithoutCompression()