fix favicon, cloudflare script blocking, error in js on startup

This commit is contained in:
2025-12-07 18:48:48 +01:00
parent 925ec7cf1e
commit 4f693a66fd
5 changed files with 11 additions and 3 deletions

View File

@@ -40,6 +40,15 @@ http {
add_header X-Content-Type-Options "nosniff" always; add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always; add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Content-Security-Policy "script-src 'self' 'unsafe-inline' https://static.cloudflareinsights.com; object-src 'none';" always;
# Favicon: serve at standard /favicon.ico location
location = /favicon.ico {
alias /usr/share/nginx/html/assets/logos/favicon.png;
expires 7d;
add_header Cache-Control "public, max-age=604800";
access_log off;
}
# Logo assets: 1 hour cache # Logo assets: 1 hour cache
location ~* ^/assets/logos/ { location ~* ^/assets/logos/ {

View File

@@ -4,6 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="light dark"> <meta name="color-scheme" content="light dark">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' https://static.cloudflareinsights.com; object-src 'none';">
<link rel="stylesheet" href="css/pico.jade.min.css"> <link rel="stylesheet" href="css/pico.jade.min.css">
<link rel="stylesheet" href="site-styles/style.css"> <link rel="stylesheet" href="site-styles/style.css">
<title>Keyboard Vagabond - About</title> <title>Keyboard Vagabond - About</title>

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -5,6 +5,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="light dark"> <meta name="color-scheme" content="light dark">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' https://static.cloudflareinsights.com; object-src 'none';">
<!-- Primary SEO Meta Tags --> <!-- Primary SEO Meta Tags -->
<title>Keyboard Vagabond - Fediverse for Digital Nomads</title> <title>Keyboard Vagabond - Fediverse for Digital Nomads</title>

View File

@@ -40,10 +40,7 @@
applyTheme(storedTheme); applyTheme(storedTheme);
themeToggle.addEventListener('click', toggleTheme);
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => { window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
// Only apply theme if user hasn't made an explicit choice
const storedTheme = getStoredTheme(); const storedTheme = getStoredTheme();
if (storedTheme === 'auto') { if (storedTheme === 'auto') {
applyTheme(); applyTheme();