skip to Main Content

I had heard that browsers (Chrome and Firefox) were going to be dropping support for http requests (and only allowing https:// requests) but it wasn’t until now that it affected me.

I’m developing an app and the app is being served on an http port (not https). My chromium-browser (on AWS linux) refuses to serve the page. I’m using Chromium Version 112.0.5615.165 (Official Build) (64-bit)

The page says:

This site can’t provide a secure connection localhost sent an invalid response.
ERR_SSL_PROTOCOL_ERROR

I’ve entered the URL:
http://localhost:4000 and chromium-browser has changed the URL from what I entered to https://localhost:4000 which is why it fails.

Below is an image of the browser
enter image description here

Just to be clear, I entered http://localhost:4000 into the URL for the browser and it was changed (by the browser) to be https://localhost:4000.

While I fully understand why this is happening, my question is how can I (as a developer for development testing) use http with my application.

For those who might argue that this should never be done, please realize that a common pattern when using Kubernetes is to have NGINX terminate an SSL connection and to make an HTTP connection to the target application.

The following diagram highlights how an application is hosted in Kubernetes at an http (not https endpoint). Http headers are used to pass the client side cert information if/when mutual authentication is being used.

enter image description here

My question is how can I configure Chromium to allow http:// when accessing my website.

I’ve seen numerous ways to configure both Firefox and Chrome to work around built-in defaults so I’m asking to change this default setting.

I searched for How do I enable http in Chrome? but only came up with answers on how to only allow https.

I should add that I’ve used curl to verify that the server is listening on the desired port and connectivity using http is not an issue. For example,

curl http://localhost:4000/

works just fine.

2

Answers


  1. Chosen as BEST ANSWER

    My apologies, the web-server was sending a 307 Redirect to the https:// URL so it was all my doing. Chromium was not the problem at all.

    I'm tempted to delete the question...

    enter image description here


  2. This is your application’s problem. chrome is innocent.

    enter image description here

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search