server_tokens off; # https://gist.github.com/ambroisemaupate/bce4b760405558f358ae 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'; style-src 'self' 'unsafe-inline' 'unsafe-eval'; script-src 'self' https://www.googletagmanager.com https://ssl.google-analytics.com; img-src 'self' data: https://ssl.google-analytics.com; object-src 'self'; connect-src 'self' http://localhost/"; ## # `gzip` Settings # # gzip on; # Disable compression for Internet Explorer versions 1-6 gzip_disable "msie6"; # Tells proxies to cache both gzipped and regular versions of a resource gzip_vary on; # Compress data even for clients that are connecting via proxies gzip_proxied any; # Sets a gzip compression level of a response. Acceptable values are in the range from 1 to 9. gzip_comp_level 6; # Sets the number and size of buffers used to compress a response. This is either 4K or 8K, depending on a platform. gzip_buffers 16 8k; gzip_http_version 1.1; # Informs NGINX to not compress anything smaller than the defined size gzip_min_length 256; # Enables the types of files that can be compressed gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript; server { listen 80; location / { root /usr/share/nginx/html; index index.html; try_files $uri $uri/ /index.html =404; } }