10 Commits

Author SHA1 Message Date
Serreau Jovann
3a85b6ef68 Remove all trackers (Umami, Cloudflare, insights-js) from cookie consent
Strip loadAnalytics, loadCloudflareTunnel and insights-js dependency.
Cookie consent banner kept for future use without any tracking scripts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:29:22 +01: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
847fc437de Disable analytics in dev env, redirect to edit page after event update
- Skip loading /stats/script.js and /assets/perf.js when data-env=dev
- Add data-env="{{ app.environment }}" to body tag
- Redirect to edit event page instead of events list after saving

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 22:39:38 +01:00
Serreau Jovann
d1e3de33df Improve editor and cookie-consent test coverage, fix RegExp.exec lint
- Add 5 editor tests: toolbar mousedown, _sync, exec with/without value
- Mock document.execCommand for happy-dom compatibility
- Add cookie-consent test for duplicate script guard
- Use RegExp.exec() instead of String.match() per ESLint rule

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 16:41:40 +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
fb5073908e Load Cloudflare Web Analytics beacon on cookie accept with tunnel token
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 16:04:21 +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