GithubHelp home page GithubHelp logo

00mjk / i-dont-care-about-hsts-for-localhost Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ip2k/i-dont-care-about-hsts-for-localhost

1.0 0.0 0.0 440 KB

Helps ease the pain of newer Chrome versions forcing HTTP Strict Transport Security for localhost, then caching via dynamic domain security policies if it ever works once, forcing HTTPS on local dev servers until "localhost" is manually reset via chrome://net-internals/#hsts every single time this happens. This installable policy for macOS fixes that via adding localhost to HSTSPolicyBypassList and CertificateTransparencyEnforcementDisabledForURLs.

License: MIT License

i-dont-care-about-hsts-for-localhost's Introduction

I Don't Care About HSTS for Localhost!

Helps ease the pain of newer Chrome versions forcing HTTP Strict Transport Security for localhost, then caching via dynamic domain security policies if it ever works once, forcing HTTPS on local dev servers until "localhost" is manually reset via chrome://net-internals/#hsts every single time this happens. This installable policy for macOS fixes that via adding localhost to HSTSPolicyBypassList and CertificateTransparencyEnforcementDisabledForURLs.

TL;DR

If you're seeing this on localhost dev servers: img/sadface.png ... and you're sick of deleting localhost from chrome://net-internals/#hsts: img/net-internals.png ...install the com.google.Chrome.mobileconfig profile from this repo, restart Chrome, and it should work.

Compatability

This is designed to work with Chrome >=78 on macOS (tested with macOS Monterey 12.3.1). Similar methods of setting this are available for Windows and Linux; see the official docs under References and Further Reading for more details on how to set those on each OS. https://appuals.com/how-to-clear-or-disable-hsts-for-chrome-firefox-and-internet-explorer/ also has some suggestions on permanent fixes for Firefox and Internet Explorer on Windows.

Installation

  1. Clone this repo
  2. In a terminal in the cloned directory, run open com.google.Chrome.mobileconfig. Alternatively, in a Finder window, double-click the file com.google.Chrome.mobileconfig
  3. You should see a notification in the upper-right that reads Review the profile in System Preferences if you want to install it
  4. Navigate to  -> System Preferences -> Profiles
  5. You should see the policy called I Don't Care About HSTS for Localhost! in the Downloaded section of the Profiles preferences pane. Click Install... and follow the prompts to authenticate and install the profile. img/policy.png
  6. Quit all Google Chrome windows. One easy way to do this is to select the Chrome menu on the top bar and select Quit Google Chrome.
  7. Verify that the policies are installed: re-open Google Chrome and navigate to chrome://policy/
  8. In the upper-right corner of the chrome://policy page, in the Filter Policies by name textbox, enter hsts and you should see the following: img/hstspolicybypasslist.png
  9. In that same Filter Policies by name textbox, enter url and you should see the following: img/certificatetransparencyenforcementdisabledforurls.png

References and Further Reading

i-dont-care-about-hsts-for-localhost's People

Contributors

ip2k avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.