-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
48 lines (48 loc) · 1.36 KB
/
next.config.js
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/** @type {import('next').NextConfig} */
module.exports = {
images: {
remotePatterns: [
{
protocol: "https",
hostname: "cdn.sanity.io",
},
{
protocol: "https",
hostname: "images.pexels.com",
},
],
},
reactStrictMode: false, // Recommend enabling strict mode for development
poweredByHeader: false, // Hides "X-Powered-By: Next.js" header for security
headers: async () => [
{
source: "/(.*)", // Applies to all routes
headers: [
{ key: "X-Developed-By", value: "Dot9" },
{ key: "X-Developed-By-Url", value: "https://at-mah.vercel.app" },
{ key: "X-DNS-Prefetch-Control", value: "on" },
{
key: "Strict-Transport-Security",
value: "max-age=31536000; includeSubDomains; preload",
},
{ key: "X-Frame-Options", value: "SAMEORIGIN" },
{ key: "X-XSS-Protection", value: "1; mode=block" },
{ key: "X-Content-Type-Options", value: "nosniff" },
{ key: "Referrer-Policy", value: "same-origin" },
{
key: "Permissions-Policy",
value: "geolocation=()",
},
],
},
{
source: "/_next/static/(.*)", // Caching for static files
headers: [
{
key: "Cache-Control",
value: "public, max-age=31536000, immutable",
},
],
},
],
};