Skip to content

Instantly share code, notes, and snippets.

@opr
Forked from jacobovidal/.htaccess
Created March 6, 2019 11:58
Show Gist options
  • Save opr/39598d19ba9860b922f6f2cb173de968 to your computer and use it in GitHub Desktop.
Save opr/39598d19ba9860b922f6f2cb173de968 to your computer and use it in GitHub Desktop.
Upgrade Insecure Requests via .htaccess or meta tag to prevent mixed content
<ifModule mod_headers.c>
Header always set Content-Security-Policy "upgrade-insecure-requests;"
Header always set Upgrade-insecure-requests "1";
</IfModule>
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment