17 Commits

Author SHA1 Message Date
Serreau Jovann
622e1894ae aa 2026-03-30 13:43:06 +02:00
Serreau Jovann
d44e75e3fd Fix SonarQube issues, store sessions in Redis, use direct analytics URLs
- ApiSandboxController: reduce scan() returns from 4 to 3 via ternary
- ApiDocController: add MIME_JSON constant, extract buildInsomniaRequest()
  and buildInsomniaBody() to reduce cognitive complexity
- Store sessions in Redis to fix SSO disconnect with 2 PHP replicas
  (round-robin load balancing caused session loss on filesystem storage)
- Configure session cookie: 24h lifetime, secure auto, samesite lax
- Replace Caddy analytics proxies (/stats/*, /assets/perf.js, /sperf)
  with direct URLs to tools-security.esy-web.dev and cloudflareinsights.com
- Update JS tests for new direct analytics URLs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 09:21:19 +01:00
Serreau Jovann
0860c1b08c Fix /sperf tunnel: keep rewrite to /cdn-cgi/rum (original Cloudflare endpoint)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 21:40:42 +01:00
Serreau Jovann
13321edd8e Rename /rum to /sperf tunnel, exclude editor.js and event-map.js from coverage
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 21:39:39 +01:00
Serreau Jovann
361548d65c Add /rum tunnel to bypass adblock for Cloudflare RUM endpoint
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 21:38:17 +01:00
Serreau Jovann
bbe727b1d4 Add unavailable page when PHP-FPM is down: Caddy handle_errors on 502/503
- Create unavailable.html static page with neo-brutalist design and retry button
- Add handle_errors in Caddy for 502/503: serve unavailable.html
- Add dial/read/write timeouts to php_fastcgi (5s/30s/30s)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 20:14:41 +01:00
Serreau Jovann
7c0149b785 Update sw.js from pwa:create:sw, add PWA static paths to Caddy prod
- sw.js regenerated by Workbox with full cache strategies
- Add screen.png, site.webmanifest, workbox/*, idb/*, pwa/* to Caddy static paths

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 19:52:20 +01:00
Serreau Jovann
689883b434 Add favicon, PWA commands (pwa_dev/pwa_prod), and prepare PWA deployment
- Add favicon.png link and apple-touch-icon in base.html.twig
- Add theme-color meta tag (#fabf04)
- Add pwa_dev and pwa_prod Makefile commands
- Add PWA asset generation step in Ansible playbook after cache clear
- Update Caddy static paths for favicon.png, marker.png, manifest.json, sw.js

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:53:36 +01:00
Serreau Jovann
edf80103f9 Rename Cloudflare beacon tunnel to /assets/perf.js to bypass adblock detection
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 16:23:44 +01:00
Serreau Jovann
b017a8ace4 Restore both Umami and Cloudflare Web Analytics with adblock bypass tunnels
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 16:07:47 +01:00
Serreau Jovann
6dac6c9c2b Remove Cloudflare Web Analytics, keep only Umami for analytics
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 16:07:19 +01:00
Serreau Jovann
9092fb80d5 Bypass adblock for Cloudflare Web Analytics: serve beacon via /cdn-cgi/ tunnel
- Change beacon script src from static.cloudflareinsights.com to /cdn-cgi/beacon.min.js
- Add Caddy reverse proxy /cdn-cgi/* -> static.cloudflareinsights.com
- Add spa:true to beacon config for SPA-like navigation tracking

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 16:06:35 +01:00
Serreau Jovann
518642551c Add cookie consent widget with analytics tunnel bypass for adblock
- Create cookie-consent.js module: banner show/hide, cookie management, conditional analytics loading
- Add cookie banner widget in base.html.twig (accept/refuse buttons)
- Analytics script loaded from /stats/ tunnel (bypass adblock) with data-host-url
- Add Caddy reverse proxy tunnel /stats/* -> tools-security.esy-web.dev
- Add tools-security.esy-web.dev to CSP connect-src
- Add 9 JS tests for cookie consent
- Revert manual composer.json edit for amazon-mailer (needs composer require)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 16:02:36 +01:00
Serreau Jovann
dc870f9ea3 Fix Caddy php_fastcgi root: use /app/public (container path) for SCRIPT_FILENAME
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:59:47 +01:00
Serreau Jovann
65dae7c661 Fix Caddy prod: use php_fastcgi instead of reverse_proxy for PHP-FPM
PHP-FPM speaks FastCGI protocol, not HTTP. Caddy must use php_fastcgi
directive with file_server and try_files for proper Symfony routing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:46:00 +01:00
Serreau Jovann
bc93a1c9d5 Fix Caddy: serve static assets during maintenance, update reverse proxy ports to 4578-4579
- Add static file handler for logo.png, favicon.ico, build/*, uploads/* before maintenance check
- Update reverse_proxy ports from 9000-9001 to 4578-4579

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:33:46 +01:00
Serreau Jovann
f822a9a069 Add deployment pipeline, maintenance page and project config
- Makefile: install_dev, install_prod, migration/migrate commands
- docker-compose-dev: add Caddy and Bun services
- docker-compose-prod: remove exposed pgbouncer port
- Ansible: Caddy template with maintenance mode (503), vault, deploy playbook
- Gitea workflow: manual deploy to production
- Maintenance page (Neubrutalism style)
- LICENSE: proprietary license

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 20:40:40 +01:00