From 35a57e5fa7ccbaa735cb3f684993b313cb465792 Mon Sep 17 00:00:00 2001 From: SaelixCode Date: Sun, 22 Mar 2026 19:41:13 -0400 Subject: [PATCH] fix(security): disable COOP header and Vite module-preload polyfill MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two console errors on HTTP deployments with no functional impact: 1. Helmet's default Cross-Origin-Opener-Policy: same-origin is ignored by browsers over HTTP but logged as a console error. Disabled via crossOriginOpenerPolicy: false (same rationale as HSTS/COEP). 2. Vite's production build injects an inline module-preload polyfill script blocked by script-src 'self'. Disabled via build.modulePreload.polyfill: false — all modern browsers support link rel="modulepreload" natively. --- CHANGELOG.md | 2 ++ backend/src/index.ts | 3 +++ frontend/vite.config.ts | 7 +++++++ 3 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06d8dd49..bb84e5c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Fixed +- **COOP header console warning on HTTP deployments:** Helmet sends `Cross-Origin-Opener-Policy: same-origin` by default, which browsers silently ignore over HTTP but log as a console error. Disabled via `crossOriginOpenerPolicy: false` — same rationale as the existing HSTS and COEP disables. +- **Inline script CSP violation from Vite module-preload polyfill:** Vite's production build injects a small inline `