Skip to content

Instantly share code, notes, and snippets.

@akrisanov
Created September 1, 2019 11:05
Show Gist options
  • Save akrisanov/ebd9106dfdbc8b74547932112e5e5eae to your computer and use it in GitHub Desktop.
Save akrisanov/ebd9106dfdbc8b74547932112e5e5eae to your computer and use it in GitHub Desktop.
Let's Encrypt, Ruby on Rails 5.2, Content Security Policy and Nginx – Gist 2
# ...
add_header Strict-Transport-Security "max-age=15768000; includeSubdomains; preload;";
add_header Content-Security-Policy "default-src 'none'; frame-ancestors 'none'; script-src 'self'; img-src 'self'; style-src 'self'; base-uri 'self'; form-action 'self';";
add_header Referrer-Policy "no-referrer, strict-origin-when-cross-origin";
add_header X-Frame-Options SAMEORIGIN;
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