Skip to content

Instantly share code, notes, and snippets.

@sinewalker
Created August 1, 2018 08:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sinewalker/047a334c06784ff3a4fe4361b2e5428d to your computer and use it in GitHub Desktop.
Save sinewalker/047a334c06784ff3a4fe4361b2e5428d to your computer and use it in GitHub Desktop.
Upgrade HTML mixed-content meta tag
<!doctype html>
<html>
<head>
<title>whatever</title>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<!-- rest of header:
<link rel="stylesheet" href="something.css">
<script src="somescript.js"/>
-->
</head>
<body>
<!-- whatever -->
</body>
</html>
@sinewalker
Copy link
Author

  • not supported by IE11 of course, and MS Edge only since early 2018
  • any <a href="http://..."> will still cause HTTP GET when clicked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment