You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Security Headers are HTTP response headers that, when set, can enhance the security of your web application by enabling browser security policies.
26
-
27
-
You can assess the security of your HTTP response headers at [securityheaders.com](https://securityheaders.com)
28
-
29
-
*Recommendations used by Secure 🔒 and more information regarding security headers can be found at the [OWASP Secure Headers Project](https://www.owasp.org/index.php/OWASP_Secure_Headers_Project).*
30
-
31
-
## Headers
32
-
33
-
#### Server
34
-
Contain information about server software
35
-
**Default Value:**`NULL`*(obfuscate server information, not included by default)*
25
+
constsecureCookie=newblockade.SecureCookie();
36
26
37
-
#### Strict-Transport-Security (HSTS)
38
-
Ensure application communication is sent over HTTPS
**Default Value:**`accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'none'; camera 'none'; encrypted-media 'none'; fullscreen 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; payment 'none'; picture-in-picture 'none'; speaker 'none'; sync-xhr 'none'; usb 'none'; vr 'none';",`*(not included by default)*
68
29
69
-
### Additional information:
70
-
- The `Strict-Transport-Security` (HSTS) header will tell the browser to **only** utilize secure HTTPS connections for the domain, and in the default configuration, including *all* subdomains. The HSTS header requires trusted certificates and users will *unable* to connect to the site if using self-signed or expired certificates. The browser will honor the HSTS header for the time directed in the max-age attribute (default = 2 years), and setting the max-age to 0 will disable an already set HSTS header. Use the `{ hsts: false }` option to not include the HSTS header in Secure Headers.
71
-
- The `Content-Security-Policy` (CSP) header can break functionality and can (and should) be carefully constructed, use the `{ csp : true }` option to enable default values.
30
+
## Secure Headers
72
31
73
32
### Example
74
-
`secureHeaders.framework(response)`
33
+
`secureHeaders.framework(response);`
75
34
76
35
**Default HTTP response headers:**
77
36
@@ -86,129 +45,25 @@ Pragma: no-cache
86
45
Expires: 0
87
46
```
88
47
89
-
### Options
90
-
91
-
You can toggle the setting of headers with default values by passing an object with `true` or `false` and override default values by passing a string to the following options:
48
+
## Secure Cookie
92
49
93
-
-`server` - set the Server header, e.g. `Server=“Secure”`*(string / bool, default=false)*
94
-
-`hsts` - set the Strict-Transport-Security header *(string / bool, default=true)*
95
-
-`xfo` - set the X-Frame-Options header *(string / bool, default=true)*
96
-
-`xxp` - set the X-XSS-Protection header *(string / bool, default=true)*
97
-
-`content` - set the X-Content-Type-Options header *(string / bool, default=true)*
98
-
-`csp` - set the Content-Security-Policy *(string / bool, default=false)* *
99
-
-`referrer` - set the Referrer-Policy header *(string / bool, default=true)*
100
-
-`cache` - set the Cache-control and Pragma headers *(string / bool, default=true)*
101
-
-`feature` - set the Feature-Policy header *(string / bool, default=false)*
0 commit comments