Fix Permissions-Policy header rejected by browsers - #2061
Conversation
The nginx add_header always keyword was inside the quoted header value, so browsers received "camera=() always" and rejected the entire Permissions-Policy header with a structured-header parse error. Moving always outside the quotes makes it an nginx directive flag rather than part of the header value, matching the neighboring security headers.
⚪ Code HealthNo change to the dead-code surface. 48 Unused files
66 Unused exports
30 Unused exported types
14 Unused exported enum members
5 Unused dependencies
3 Unused devDependencies
|
Problem
The nginx
alwayskeyword was inside the quoted header value on thePermissions-Policydirective:Browsers therefore received the header value
geolocation=(), microphone=(), camera=() alwaysand rejected the entire header. The console reports:Confirmed on a deployed build on 2026-08-20. As a result the app ships no effective
Permissions-Policyheader in production (Cloud Run servicedashboardinestuary-control).Fix
Move
alwaysoutside the quotes so nginx treats it as a directive flag, not part of the header value. This matches the neighboring security headers (Strict-Transport-Security,X-Frame-Options, etc.).One-line change in
public/nginx.conf.