Skip to content

Instantly share code, notes, and snippets.

@mathiasbynens
Last active March 11, 2024 06:10
Show Gist options
  • Star 19 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save mathiasbynens/1356094dccf7f15f8e2f to your computer and use it in GitHub Desktop.
Save mathiasbynens/1356094dccf7f15f8e2f to your computer and use it in GitHub Desktop.
Get the latest version of https://chromium.googlesource.com/chromium/src/+/master/net/http/transport_security_state_static.json in an automated way and convert it to proper JSON
#!/usr/bin/env bash
# https://code.google.com/p/chromium/issues/detail?id=226801
url='https://chromium.googlesource.com/chromium/src/net/+/master/http/transport_security_state_static.json?format=TEXT';
curl -#s "${url}" | \
base64 --decode | \
sed '/^ *\/\// d' | \
sed '/^\s*$/d' > hsts.json;
@IS4Code
Copy link

IS4Code commented Dec 15, 2023

And then they decide to change the URL for no reason... it is https://chromium.googlesource.com/chromium/src/+/main/net/http/transport_security_state_static.json?format=TEXT now.

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