File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/** @type {import('next').NextConfig } */
2- const nextConfig = { } ;
2+ const nextConfig = {
3+ poweredByHeader : false ,
4+ async headers ( ) {
5+ return [
6+ {
7+ source : '/(.*)' ,
8+ headers : [
9+ {
10+ key : 'strict-transport-security' ,
11+ value : 'max-age=31536000; includeSubDomains; preload' ,
12+ } ,
13+ {
14+ key : 'content-security-policy' ,
15+ value : `
16+ default-src 'self';
17+ script-src 'report-sample' 'self' 'unsafe-inline' 'unsafe-eval';
18+ style-src 'report-sample' 'self' 'unsafe-inline' https://fonts.googleapis.com;
19+ object-src 'none';
20+ base-uri 'self';
21+ connect-src 'self';
22+ font-src 'self' https://fonts.gstatic.com;
23+ frame-src 'self' https://docs.google.com;
24+ img-src 'self';
25+ manifest-src 'self';
26+ media-src 'self';
27+ worker-src 'none';
28+ `
29+ . replace ( / \s + / g, ' ' )
30+ . trim ( ) ,
31+ } ,
32+ {
33+ key : 'x-frame-options' ,
34+ value : 'SAMEORIGIN' ,
35+ } ,
36+ {
37+ key : 'x-content-type-options' ,
38+ value : 'nosniff' ,
39+ } ,
40+ {
41+ key : 'referrer-policy' ,
42+ value : 'strict-origin-when-cross-origin' ,
43+ } ,
44+ {
45+ key : 'permissions-policy' ,
46+ value : `
47+ camera=(),
48+ microphone=(),
49+ geolocation=(),
50+ usb=(),
51+ payment=()
52+ `
53+ . replace ( / \s + / g, ' ' )
54+ . trim ( ) ,
55+ } ,
56+ ] ,
57+ } ,
58+ ] ;
59+ } ,
60+ } ;
361
462export default nextConfig ;
You can’t perform that action at this time.
0 commit comments