The solution to the problem that the browser enters http and automatically converts to https

Table of contents

appearance

reason

solution

solution one

solution two


appearance

        Today, I encountered a problem during the development process. The address of our project is " http://xxx.xxx.com/website/ ", the result is pasted into the browser and automatically jumps to " https://xxx.xxx .com/website/ ". Puzzled, why?

reason

        The browser has turned on the HSTS (HTTP Strict Transport Security) function, which will tell the browser that it can only be accessed through https, and the http method is absolutely prohibited, so after entering http in the browser, it is automatically converted to https.

solution

        The solutions I've received online are all basically the same. It's all solution one, but for me, solution one can't solve my problem. I'm using solution two to fix the problem.

solution one

Step 1: Enter "chrome://net-internals/#hsts" in the browser.

Step 2: Enter the address of the automatic jump in the Delete domain security policies column, and then delete it. Note that the address here is to remove https://, as long as the domain name.

Step 3: Re-enter and try again.

solution two

Step 1: Open the browser settings and enter the security settings.

 Step 2: Turn off "Always use a secure connection".

 Step 3: Click on the little lock icon. Select "Site Settings".

 Step 4: You can see that it is to enter the security settings under a single website, clear the cookie, and then re-enter the address to solve it. 

Guess you like

Origin blog.csdn.net/lly576403061/article/details/130249952