Created
May 21, 2021 15:31
-
-
Save thelovekesh/38f15d839806213bc384432b1dd8e8a4 to your computer and use it in GitHub Desktop.
Best HTTP security headers for Nginx
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
| # Include these headers in /etc/nginx/sites-available/example.com.conf file | |
| # security headers | |
| add_header X-Frame-Options "SAMEORIGIN" always; | |
| add_header X-XSS-Protection "1; mode=block" always; | |
| add_header X-Content-Type-Options "nosniff" always; | |
| add_header Referrer-Policy "no-referrer-when-downgrade" always; | |
| add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always; | |
| add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment