77interface HeadersConfig {
88 paths : Array < {
99 pattern : string ;
10- headers : Record < string , string | Record < string , string [ ] > > ;
10+ headers : Record < string , string [ ] | Record < string , string [ ] > > ;
1111 } > ;
1212}
1313
@@ -18,7 +18,7 @@ const config: HeadersConfig = {
1818 headers : {
1919 'Content-Security-Policy' : {
2020 'connect-src' : [
21- '\' self\'' ,
21+ `' self'` ,
2222 'https://status.maxmind.com' ,
2323 'https://www.maxmind.com' ,
2424 'https://api.hubspot.com' ,
@@ -30,37 +30,22 @@ const config: HeadersConfig = {
3030 'https://*.g.doubleclick.net' ,
3131 'https://*.google.com' ,
3232 ] ,
33- 'default-src' : [
34- '\'self\'' ,
35- ] ,
36- 'font-src' : [
37- '\'self\'' ,
38- 'https://fonts.gstatic.com' ,
39- ] ,
40- 'form-action' : [
41- '\'self\'' ,
42- ] ,
43- 'frame-ancestors' : [
44- '\'self\'' ,
45- ] ,
33+ 'default-src' : [ `'self'` ] ,
34+ 'font-src' : [ `'self'` , 'https://fonts.gstatic.com' ] ,
35+ 'form-action' : [ `'self'` ] ,
36+ 'frame-ancestors' : [ `'self'` ] ,
4637 'frame-src' : [
47- '\' self\'' ,
38+ `' self'` ,
4839 'https://app.hubspot.com' ,
4940 'https://www.google.com' ,
5041 'https://www.googletagmanager.com' ,
5142 ] ,
52- 'img-src' : [
53- '\'self\'' ,
54- 'data:' ,
55- 'https:' ,
56- ] ,
57- 'object-src' : [
58- '\'none\'' ,
59- ] ,
43+ 'img-src' : [ `'self'` , 'data:' , 'https:' ] ,
44+ 'object-src' : [ `'none'` ] ,
6045 'script-src' : [
61- '\' self\'' ,
62- '\' report-sample\'' ,
63- '\' unsafe-inline\'' ,
46+ `' self'` ,
47+ `' report-sample'` ,
48+ `' unsafe-inline'` ,
6449 'https://js.hs-scripts.com' ,
6550 'https://js.hs-analytics.net' ,
6651 'https://js.hs-banner.com' ,
@@ -73,34 +58,67 @@ const config: HeadersConfig = {
7358 'https://*.googletagmanager.com' ,
7459 ] ,
7560 'style-src' : [
76- '\' self\'' ,
77- '\' unsafe-inline\'' ,
61+ `' self'` ,
62+ `' unsafe-inline'` ,
7863 'https://fonts.googleapis.com' ,
7964 'https://www.gstatic.com' ,
8065 ] ,
8166 } ,
82- 'Feature-Policy' :
83- 'accelerometer \'none\'; autoplay \'none\'; camera \'none\'; ' +
84- 'encrypted-media \'none\'; fullscreen \'none\'; geolocation \'none\'; ' +
85- 'gyroscope \'none\'; magnetometer \'none\'; microphone \'none\'; ' +
86- 'midi \'none\'; payment \'none\'; picture-in-picture \'none\'; ' +
87- 'usb \'none\'; sync-xhr \'none\'' ,
88- 'Permissions-Policy' :
89- 'accelerometer=(), ambient-light-sensor=(), autoplay=(), ' +
90- 'battery=(), camera=(), display-capture=(), document-domain=(), ' +
91- 'encrypted-media=(), execution-while-not-rendered=(), ' +
92- 'execution-while-out-of-viewport=(), fullscreen=(), gamepad=(), ' +
93- 'geolocation=(), gyroscope=(), hid=(), idle-detection=(), ' +
94- 'magnetometer=(), microphone=(), midi=(), payment=(), ' +
95- 'picture-in-picture=(), publickey-credentials-get=(), ' +
96- 'screen-wake-lock=(), serial=(), speaker-selection=(), usb=(), ' +
97- 'web-share=(), xr-spatial-tracking=()' ,
98- 'Referrer-Policy' : 'strict-origin-when-cross-origin' ,
99- 'Strict-Transport-Security' :
100- 'max-age=63072000; includeSubDomains; preload' ,
101- 'X-Content-Type-Options' : 'nosniff' ,
102- 'X-Frame-Options' : 'DENY' ,
103- 'X-XSS-Protection' : '1; mode=block' ,
67+ 'Feature-Policy' : [
68+ `accelerometer 'none'` ,
69+ `autoplay 'none'` ,
70+ `camera 'none'` ,
71+ `encrypted-media 'none'` ,
72+ `fullscreen 'none'` ,
73+ `geolocation 'none'` ,
74+ `gyroscope 'none'` ,
75+ `magnetometer 'none'` ,
76+ `microphone 'none'` ,
77+ `midi 'none'` ,
78+ `payment 'none'` ,
79+ `picture-in-picture 'none'` ,
80+ `usb 'none'` ,
81+ `sync-xhr 'none'` ,
82+ ] ,
83+ 'Permissions-Policy' : [
84+ 'accelerometer=()' ,
85+ 'ambient-light-sensor=()' ,
86+ 'autoplay=()' ,
87+ 'battery=()' ,
88+ 'camera=()' ,
89+ 'display-capture=()' ,
90+ 'document-domain=()' ,
91+ 'encrypted-media=()' ,
92+ 'execution-while-not-rendered=()' ,
93+ 'execution-while-out-of-viewport=()' ,
94+ 'fullscreen=()' ,
95+ 'gamepad=()' ,
96+ 'geolocation=()' ,
97+ 'gyroscope=()' ,
98+ 'hid=()' ,
99+ 'idle-detection=()' ,
100+ 'magnetometer=()' ,
101+ 'microphone=()' ,
102+ 'midi=()' ,
103+ 'payment=()' ,
104+ 'picture-in-picture=()' ,
105+ 'publickey-credentials-get=()' ,
106+ 'screen-wake-lock=()' ,
107+ 'serial=()' ,
108+ 'speaker-selection=()' ,
109+ 'usb=()' ,
110+ 'web-share=()' ,
111+ 'xr-spatial-tracking=()' ,
112+ ] ,
113+ 'Referrer-Policy' : [ 'strict-origin-when-cross-origin' ] ,
114+ 'Strict-Transport-Security' : [
115+ 'max-age=63072000' ,
116+ 'includeSubDomains' ,
117+ 'preload' ,
118+ ] ,
119+ 'X-Content-Type-Options' : [ 'nosniff' ] ,
120+ 'X-Frame-Options' : [ 'DENY' ] ,
121+ 'X-XSS-Protection' : [ '1' , 'mode=block' ] ,
104122 } ,
105123 } ,
106124 ] ,
0 commit comments