-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
29 lines (27 loc) · 1.22 KB
/
Copy pathnext.config.ts
File metadata and controls
29 lines (27 loc) · 1.22 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
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
devIndicators: false,
allowedDevOrigins: ['127.0.0.1', 'localhost'],
async headers() {
return [
{
source: "/:path*",
headers: [
// Nothing on the site is meant to be embedded in other origins'
// frames (clickjacking guard for /app, /admin, /login).
{ key: "X-Frame-Options", value: "SAMEORIGIN" },
{ key: "X-Content-Type-Options", value: "nosniff" },
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
// Force HTTPS for two years. Vercel terminates TLS for all prod
// traffic, so this is safe to set unconditionally. No "preload" —
// that's a hard-to-reverse commitment we shouldn't opt into here.
{ key: "Strict-Transport-Security", value: "max-age=63072000; includeSubDomains" },
// The app uses none of these powerful features — deny them so a
// future injection / third-party script can't reach device sensors.
{ key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=(), browsing-topics=(), payment=(), usb=()" },
],
},
];
},
};
export default nextConfig;