Skip to content

Instantly share code, notes, and snippets.

@mbrughi
Forked from jacobovidal/.htaccess
Last active May 5, 2022 14:05
Show Gist options
  • Save mbrughi/43e272f4afed6d81f71c42ce6807563b to your computer and use it in GitHub Desktop.
Save mbrughi/43e272f4afed6d81f71c42ce6807563b 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;"
</IfModule>
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
add_header Content-Security-Policy upgrade-insecure-requests;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment