diff options
| author | Gab Virebent <gabriel1@virebent.art> | 2026-07-08 23:54:25 +0200 |
|---|---|---|
| committer | Gab Virebent <gabriel1@virebent.art> | 2026-07-08 23:54:25 +0200 |
| commit | eae435a87aaf60c1da17a9df40c6277eb92458c7 (patch) | |
| tree | 12db63f8da7068d8c00a0dd09e436cdf1f8edb90 | |
| parent | 1aa795176375289bce335ad32fcdf758b612b277 (diff) | |
| download | nymdrop-eae435a87aaf60c1da17a9df40c6277eb92458c7.tar.gz nymdrop-eae435a87aaf60c1da17a9df40c6277eb92458c7.tar.xz nymdrop-eae435a87aaf60c1da17a9df40c6277eb92458c7.zip | |
Add Nym community favicon and allow img-src in CSP
favicon.ico/32/48 reference the official Nym icon so the site is
recognizable as Nym-community. CSP img-src 'self' data: was needed
for the PNG variants to load under the strict script-src 'self' policy.
| -rw-r--r-- | internal/handler/static.go | 3 | ||||
| -rw-r--r-- | static/favicon-32.png | bin | 0 -> 974 bytes | |||
| -rw-r--r-- | static/favicon-48.png | bin | 0 -> 540 bytes | |||
| -rw-r--r-- | static/favicon.ico | bin | 0 -> 15086 bytes | |||
| -rw-r--r-- | static/index.html | 4 |
5 files changed, 5 insertions, 2 deletions
diff --git a/internal/handler/static.go b/internal/handler/static.go index bf2aaec..8e87172 100644 --- a/internal/handler/static.go +++ b/internal/handler/static.go @@ -7,8 +7,7 @@ import ( func Static(dir string) http.Handler { fs := http.FileServer(http.Dir(dir)) return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - // Security headers on every response. - w.Header().Set("Content-Security-Policy", "default-src 'self'; script-src 'self'; style-src 'self'") + w.Header().Set("Content-Security-Policy", "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data:; connect-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'none'") w.Header().Set("X-Content-Type-Options", "nosniff") w.Header().Set("Referrer-Policy", "no-referrer") w.Header().Set("Permissions-Policy", "geolocation=(), microphone=(), camera=()") diff --git a/static/favicon-32.png b/static/favicon-32.png Binary files differnew file mode 100644 index 0000000..12a9e80 --- /dev/null +++ b/static/favicon-32.png diff --git a/static/favicon-48.png b/static/favicon-48.png Binary files differnew file mode 100644 index 0000000..95907b4 --- /dev/null +++ b/static/favicon-48.png diff --git a/static/favicon.ico b/static/favicon.ico Binary files differnew file mode 100644 index 0000000..f1e3c53 --- /dev/null +++ b/static/favicon.ico diff --git a/static/index.html b/static/index.html index 84264b7..218af7e 100644 --- a/static/index.html +++ b/static/index.html @@ -5,6 +5,10 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="referrer" content="no-referrer"> <title>NymDrop — Secure Submission</title> + <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png?v=20260708-2"> + <link rel="icon" type="image/png" sizes="48x48" href="/favicon-48.png?v=20260708-2"> + <link rel="icon" type="image/x-icon" sizes="any" href="/favicon.ico?v=20260708-2"> + <link rel="shortcut icon" href="/favicon.ico?v=20260708-2"> <link rel="stylesheet" href="/style.css"> <script src="/theme-init.js"></script> </head> |
