Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions backend/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ app.use(helmet({
},
},
crossOriginEmbedderPolicy: false, // Google Maps requires this to be off
// Helmet defaults to 'no-referrer', which strips the Referer header from
// every request the page makes — including same-origin fetches. That
// broke the same-origin check on GET /api/gmaps/key (it always 403'd,
// even from the real page). 'strict-origin-when-cross-origin' is the
// browser default: full URL on same-origin requests, origin-only cross-origin.
referrerPolicy: { policy: 'strict-origin-when-cross-origin' },
}));

// ── Middleware ────────────────────────────────────────────────────────────────
Expand Down