Created
February 11, 2020 07:25
-
-
Save OrionStark/2a128c07d155520727c53a0a4e73f5a2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function __addSecureAndCacheHeaders(res) { | |
// OWASP Secure Headers | |
res.set('X-Content-Type-Options', 'nosniff') | |
res.set('X-XSS-Protection', '1; mode=block') | |
res.set('X-Frame-Options', 'DENY') | |
res.set('Strict-Transport-Security', 'max-age=63072000; includeSubDomains') | |
// Avoid Caching Tokens | |
res.set('Cache-Control', 'no-cache, no-store, must-revalidate') | |
res.set('Pragma', 'no-cache') | |
res.set('Expires', '0') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment