laravel代客:“不安全”继续重定向到https

I tried out valet's "secure" functionality. It worked well, but ultimately, it wasn't working well with the rest of my stack so I tried running "valet unsecure sitename" per the documentation. It nonetheless seems to still be in some way linked: if I attempted to navigate to the site now, it runs into a redirect loop. I have tried re-starting the server, etc. Nothing seems to work. If I re-run the "valet secure sitename" and navigate to https://sitename.dev, it will begin working once again. It seems to be stuck on "secure" mode no matter what once you run the command once.

Has anyone else run into this and is there a fix for it? I could not find anything in reference except a few people with the same unanswered question on some random sites.

I think is chrome setting problem. I change to use Safari and Postman that can connect http. Not return to https. But return 404 not found.

Afetr I uninstall valet, and install repeat again. It works http in Safari.
reference Uninstall Laravel Valet

Yes.

As of Chrome 63 because .dev is a valid gTLD that can be used by the public and Chrome has been growing the preload list .

The options are as follows:

  • do not use Chrome 63 or later
  • You can use the gTLD .test which could eventually have the issue but is presently held by the IETF for internal purposes
  • IETF also has a draft for the .localhost name to be mapped to the local loopback address.

Maybe this answer is wrong but it may be related to your browser, your browser may be trying to redirect you to a "more secure" "version" of the site, that is to use the HTTPS protocol.

I've had had this problem, before and the solution depends on the browser you're using.

The easiest way to tell if this a Valet issue vs a browser issue is to try to access the non-https version of your domain with a fresh browser, try other browser or download another one.

If is a browser isse google something like "clear HSTS on "

(I know the question is 1 year old but some people may come from google having this problem due to their browsers)