-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathnext.config.js
More file actions
29 lines (28 loc) · 1 KB
/
Copy pathnext.config.js
File metadata and controls
29 lines (28 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/** @type {import('next').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;