Skip to content

Commit ecf4125

Browse files
committed
feat: infrastructure lockdown against search engine crawlers and automated bots is complete!
1 parent d5f9022 commit ecf4125

2 files changed

Lines changed: 31 additions & 18 deletions

File tree

app/layout.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ export const metadata: Metadata = {
6666
robots: {
6767
index: false,
6868
follow: false,
69+
nocache: true,
70+
googleBot: {
71+
index: false,
72+
follow: false,
73+
noimageindex: true,
74+
"max-video-preview": -1,
75+
"max-image-preview": "none",
76+
"max-snippet": -1,
77+
},
6978
},
7079
};
7180

next.config.ts

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,48 @@
11
import type { NextConfig } from "next";
22

3-
43
const nextConfig: NextConfig = {
54
/* config options here */
65
async headers() {
76
return [
87
{
9-
source: '/:path*',
8+
source: "/:path*",
109
headers: [
1110
{
12-
key: 'X-DNS-Prefetch-Control',
13-
value: 'on'
11+
key: "X-DNS-Prefetch-Control",
12+
value: "on",
13+
},
14+
{
15+
key: "Strict-Transport-Security",
16+
value: "max-age=63072000; includeSubDomains; preload",
1417
},
1518
{
16-
key: 'Strict-Transport-Security',
17-
value: 'max-age=63072000; includeSubDomains; preload'
19+
key: "X-XSS-Protection",
20+
value: "1; mode=block",
1821
},
1922
{
20-
key: 'X-XSS-Protection',
21-
value: '1; mode=block'
23+
key: "X-Frame-Options",
24+
value: "DENY", // Preventing clickjacking
2225
},
2326
{
24-
key: 'X-Frame-Options',
25-
value: 'DENY' // Preventing clickjacking
27+
key: "X-Content-Type-Options",
28+
value: "nosniff",
2629
},
2730
{
28-
key: 'X-Content-Type-Options',
29-
value: 'nosniff'
31+
key: "Referrer-Policy",
32+
value: "strict-origin-when-cross-origin",
3033
},
3134
{
32-
key: 'Referrer-Policy',
33-
value: 'strict-origin-when-cross-origin'
35+
key: "Permissions-Policy",
36+
value:
37+
"camera=(), microphone=(), geolocation=(), interest-cohort=()",
3438
},
3539
{
36-
key: 'Permissions-Policy',
37-
value: 'camera=(), microphone=(), geolocation=(), interest-cohort=()'
38-
}
40+
key: "X-Robots-Tag",
41+
value: "noindex, nofollow, nosnippet, noarchive, noimageindex",
42+
},
3943
],
4044
},
41-
]
45+
];
4246
},
4347
};
4448

0 commit comments

Comments
 (0)