Created
November 19, 2025 07:21
-
-
Save LaurenceJJones/ecee30389109a6489154a1ba5a7ca57d to your computer and use it in GitHub Desktop.
example security.conf
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
| # security headers | |
| add_header X-XSS-Protection "0;" 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: ws: wss: data: blob: 'unsafe-inline' 'unsafe-eval'; frame-ancestors 'self';" always; | |
| add_header Permissions-Policy "interest-cohort=()" always; | |
| add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; | |
| # . files | |
| location ~ /\.(?!well-known) { | |
| deny all; | |
| } | |
| # security.txt | |
| location /security.txt { | |
| return 301 /.well-known/security.txt; | |
| } | |
| location = /.well-known/security.txt { | |
| add_header Content-Type text/plain; | |
| return 200 'Contact: mailto:[email protected]\nExpires: 2026-01-01T00:00:00.000Z'; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment