Skip to content

Instantly share code, notes, and snippets.

@manicminer
Forked from gingray/firefox_disable_hsts.md
Created January 22, 2021 17:05
Show Gist options
  • Save manicminer/0214aa9cce8c96137aa0771263a6bac1 to your computer and use it in GitHub Desktop.
Save manicminer/0214aa9cce8c96137aa0771263a6bac1 to your computer and use it in GitHub Desktop.
firefox disable hsts
According to several forums, you can disable HSTS by introducing a new configuration variable. First, go to the Firefox configuration page (about:config), right-click, choose "New Integer", then provide the name "test.currentTimeOffsetSeconds" (no quotes) with a value of 11491200. This should bypass HSTS, although you may also need to clear the Cache and Active Logins in the Clear Recent History dialog (Ctrl-Shift-Del).

This apparently works because of a function called GetPreloadListEntry that checks to see if the current time is less than the next list expiration time; since the time is effectively calculated to be later than the expiration time, no check is performed. This effectively disables HSTS checks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment