From 1fb9644d5a7c074a2f77a74622f2cf8fcb31d9dc Mon Sep 17 00:00:00 2001 From: Pontoporeia Date: Mon, 2 Mar 2026 15:43:29 +0100 Subject: [PATCH] fix favicon 404s: add to all pages, nginx 204 for /favicon.ico --- TODO.md | 1 + nginx/posterg.conf | 7 +++++++ public/admin/login.php | 1 + public/apropos.php | 1 + public/index.php | 1 + public/search.php | 1 + public/tfe.php | 1 + templates/admin/head.php | 1 + templates/head.php | 1 + 9 files changed, 15 insertions(+) diff --git a/TODO.md b/TODO.md index 261a9a1..516e5c3 100644 --- a/TODO.md +++ b/TODO.md @@ -35,6 +35,7 @@ ## Pending +- [x] Add favicon (`` → admin_favicon.svg) to all pages; nginx 204 for /favicon.ico - [ ] Add pagination to répertoire student index (currently capped at 100) - [ ] Thumbnail generation / cover image support for home grid cards diff --git a/nginx/posterg.conf b/nginx/posterg.conf index 48f203a..669628c 100644 --- a/nginx/posterg.conf +++ b/nginx/posterg.conf @@ -183,6 +183,13 @@ server { add_header Content-Disposition "inline"; } + # Silence favicon.ico 404s — browsers that ignore still request this + location = /favicon.ico { + return 204; + access_log off; + log_not_found off; + } + # Root location - try files or 404 location / { try_files $uri $uri/ =404; diff --git a/public/admin/login.php b/public/admin/login.php index fbecf15..a91e096 100644 --- a/public/admin/login.php +++ b/public/admin/login.php @@ -29,6 +29,7 @@ $pageTitle = 'Connexion'; Connexion – Posterg Admin + diff --git a/public/apropos.php b/public/apropos.php index 896a432..810e8f0 100644 --- a/public/apropos.php +++ b/public/apropos.php @@ -8,6 +8,7 @@ $currentNav = 'apropos'; À Propos – Posterg + diff --git a/public/index.php b/public/index.php index 58f10ab..6e7340a 100644 --- a/public/index.php +++ b/public/index.php @@ -37,6 +37,7 @@ $currentNav = ''; Posterg + diff --git a/public/search.php b/public/search.php index 4be9b18..b932c3d 100644 --- a/public/search.php +++ b/public/search.php @@ -68,6 +68,7 @@ $searchBarValue = $_GET['query'] ?? ''; Répertoire – Posterg + diff --git a/public/tfe.php b/public/tfe.php index 17a6b0c..dde280b 100644 --- a/public/tfe.php +++ b/public/tfe.php @@ -24,6 +24,7 @@ $currentNav = ''; <?= htmlspecialchars($data['title']) ?> – Posterg + diff --git a/templates/admin/head.php b/templates/admin/head.php index 7cb7d0f..e8f3cdf 100644 --- a/templates/admin/head.php +++ b/templates/admin/head.php @@ -4,6 +4,7 @@ <?= htmlspecialchars($pageTitle ?? 'Admin') ?> – Posterg + diff --git a/templates/head.php b/templates/head.php index e2439dc..06ab94e 100644 --- a/templates/head.php +++ b/templates/head.php @@ -7,6 +7,7 @@ <?= isset($pageTitle) ? htmlspecialchars($pageTitle) . ' - Posterg' : 'Posterg' ?> +