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
27 changes: 26 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
// Basic hardening headers on every route. A full Content-Security-Policy
// is a bigger, separate effort (it would need to account for MapTiler
// tiles, Supabase, Vercel Analytics, and the Leaflet/OG image pipelines)
// and is left for a follow-up.
async headers() {
return [
{
source: "/:path*",
headers: [
{ key: "X-Content-Type-Options", value: "nosniff" },
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
// geolocation stays enabled for this origin - the "Near me"
// feature genuinely uses it. Everything else this app doesn't
// use is disabled.
{
key: "Permissions-Policy",
value: "camera=(), microphone=(), geolocation=(self)",
},
// Nothing in the app needs to be iframed.
{ key: "X-Frame-Options", value: "DENY" },
],
},
];
},
};

module.exports = nextConfig;
Loading