Last active
December 9, 2019 11:37
-
-
Save jtadeulopes/7237669 to your computer and use it in GitHub Desktop.
Nginx settings
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
worker_processes 1; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
access_log /var/log/nginx/access.log; | |
sendfile on; | |
keepalive_timeout 65; | |
gzip on; | |
client_max_body_size 4M; | |
client_body_buffer_size 128k; | |
# Based on https://gist.github.com/plentz/6737338 | |
server_tokens off; | |
add_header Access-Control-Allow-Origin '*'; | |
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;"; | |
add_header X-Frame-Options SAMEORIGIN; | |
add_header X-Content-Type-Options nosniff; | |
add_header X-XSS-Protection "1; mode=block"; | |
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://ssl.google-analytics.com https://assets.zendesk.com https://connect.facebo ok.net; img-src 'self' https://ssl.google-analytics.com https://s-static.ak.facebook.com https://assets.zendesk.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://ass ets.zendesk.com; font-src 'self' https://themes.googleusercontent.com; frame-src https://assets.zendesk.com https://www.facebook.com https://s-static.ak.facebook.com https://tautt.zendesk.co m; object-src 'none'"; | |
include /opt/nginx/conf/sites-enabled/*; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment