File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,12 @@ function handler(event) {
5
5
// Set HTTP security headers
6
6
// Since JavaScript doesn't allow for hyphens in variable names, we use the dict["key"] notation
7
7
headers [ 'strict-transport-security' ] = { value : 'max-age=63072000; includeSubdomains; preload' } ;
8
- headers [ 'content-security-policy' ] = { value : "default-src 'none'; img-src 'self'; script-src 'self'; style-src 'self'; object-src 'none'" } ;
8
+ headers [ 'content-security-policy' ] = { value : "default-src 'none'; img-src 'self'; script-src 'self'; style-src 'self'; object-src 'none'; frame-ancestors 'none' " } ;
9
9
headers [ 'x-content-type-options' ] = { value : 'nosniff' } ;
10
10
headers [ 'x-frame-options' ] = { value : 'DENY' } ;
11
- headers [ 'x-xss-protection' ] = { value : '1; mode=block' } ;
11
+ headers [ 'x-xss-protection' ] = { value : '1; mode=block' } ;
12
+ headers [ 'referrer-policy' ] = { value : 'same-origin' } ;
12
13
13
14
// Return the response to viewers
14
15
return response ;
15
- }
16
+ }
You can’t perform that action at this time.
0 commit comments