Last active
March 11, 2021 22:42
-
-
Save dariok/2e14bbd4e67c211dcfa5e900d978e7c5 to your computer and use it in GitHub Desktop.
nginx configuration for secure eXist connections
This file contains 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
location ~ / { | |
proxy_pass https://example.com:8443; | |
proxy_set_header Host $http_host; | |
add_header Content-Security-Policy "default-src 'none'; img-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://code.jquery.com; style-src 'self' 'unsafe-inline'; style-src-elem 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.googleapis.com https://fonts.gstatic.com; connect-src 'self'; frame-ancestors 'none'; base-uri 'self'; form-action 'self'"; | |
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"; | |
add_header X-Content-Type-Options "nosniff"; | |
add_header X-XSS-Protection "1; mode=block"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
2nd revision to allow console to work