Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

Commit 6f3de9f

Browse files
committed
fix: add gravatar.com to CSP img-src to allow avatar loading
1 parent 64a7928 commit 6f3de9f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/middleware/security.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func SecurityHeaders(next http.Handler) http.Handler {
2222
w.Header().Set("X-DNS-Prefetch-Control", "off")
2323
w.Header().Set("Permissions-Policy", "camera=(), microphone=(), geolocation=()")
2424
w.Header().Set("Referrer-Policy", "strict-origin-when-cross-origin")
25-
w.Header().Set("Content-Security-Policy", "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.jsdelivr.net https://unpkg.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' https://img.zero-host.org data:; font-src 'self' https://fonts.gstatic.com; connect-src 'self' https://cap.zero-host.org https://cdn.jsdelivr.net; frame-src 'self' blob:; worker-src 'self' blob:; base-uri 'self'")
25+
w.Header().Set("Content-Security-Policy", "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.jsdelivr.net https://unpkg.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' https://img.zero-host.org https://www.gravatar.com data:; font-src 'self' https://fonts.gstatic.com; connect-src 'self' https://cap.zero-host.org https://cdn.jsdelivr.net; frame-src 'self' blob:; worker-src 'self' blob:; base-uri 'self'")
2626
next.ServeHTTP(w, r)
2727
})
2828
}

0 commit comments

Comments
 (0)