Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Upgrade-Insecure-Requests in Firefox and Chrome [duplicate]

Does using Chrome v.63 force use of https?

I am running Apache 2.4.27 on a Windows 10 desktop as a sandbox where I can experiment and do some tutorials. I have a virtual host setup called www.tutorial.dev with an alias of tutorial.dev. In the Windows 10 hosts file I have set up www.tutorial.dev and tutorial.dev to point to localhost.

As of yesterday the url http://tutorial.dev/Bootstrap4FromScratch/ was working normally. In this case providing a directory listing as a jump off point into various examples and exercises. Today, when I type in the url Chrome changes it to https and I get a connection refused message.

I understand the connection refused message. There are no certificates setup.

The only change I can find is that Chrome changed from v.62.x to v.63.x. What in Chrome 63 could be forcing http to https?

I don't have this problem with MS Edge. I tested another similar configuration on a different machine that was in the process of downloading Chrome 63.x. It already had 62.x installed. It worked until the 63.x upgrade was complete then the same problem occurred.

Additional information: If I use http://localhost to bring up the index.html or version.php in the htdocs directory the switch from http to https does not happen. The virtual host www.tutorial.dev resides in another directory outside of htdocs.

If this has been asked and answered please point me to the question/answer thread.

Thanks in advance,

Barry

like image 983
Barry S. Rayfield Avatar asked Dec 08 '17 03:12

Barry S. Rayfield


People also ask

What does upgrade insecure requests do?

The HTTP Content-Security-Policy (CSP) upgrade-insecure-requests directive instructs user agents to treat all of a site's insecure URLs (those served over HTTP) as though they have been replaced with secure URLs (those served over HTTPS).

What is a upgrade insecure requests header?

The Upgrade-Insecure-Requests HTTP request header field sends a signal to the server expressing the client's preference for an encrypted and authenticated response, and that it can successfully handle the upgrade-insecure-requests directive in order to make that preference as seamless as possible to provide.

What does insecure request mean?

Common requests are for images, css, and javascript. Upgrade Insecure Requests essentially means that any page resource being called from a non-secure source (http) should be changed to a secure source (https).

Was loaded over https but requested an insecure resource http?

You are trying to access via "http" on a "https" site, its best to use "https" content. You shouldn't access insecure data on a secure channel. Sometimes just use 'http' instead of 'https' can solve this issue.


1 Answers

Google owns the .dev TLD and with Chrome 63 they are forcing HTTPS on all requests to anything.dev

I went through my local dev setup and replaced all references to .dev with .local, works fine now.

Your other option is to use Firefox for local development. .dev now triggers https in FF (since before FF61) with a workaround

Edit (asside): I have switched to using .localhost for dev as browsers allow navigator.geolocation.getCurrentPosition() (blocked if site is not HTTPS).

like image 114
Duncanmoo Avatar answered Oct 10 '22 09:10

Duncanmoo