http with localhost port 8080 is always rewritten as https
As a java/web developer I often run applications locally (on localhost) but cannot use the “http” protocol with localhost in brave since it always rewrites it as “https” and so I need to switch to chrome or firefox. While I could configure a certificate and https for the application it is quite some effort each time.
To reproduce:
- Locally run a spring boot web application. (anything running locally and listening on an http port should work)
- Paste or type http://localhost:8080 into the address bar
Expected result:
URL has been rewritten as https with a response:
This site can’t provide a secure connection
localhost sent an invalid response.
ERR_SSL_PROTOCOL_ERROR
Expected result:
Local webpage is displayed
Brave Version
Version 1.17.75 Chromium: 87.0.4280.88
Additional Information:
I have this on mac and windows. Chrome works fine, firefox also.
In developer tools in Brave I see a 307 status code. I’m pretty sure the Spring Boot app is not sending back a redirect to https (it is not configured for https)
From Developer Tools:
Request:
Request URL: http://localhost:8080/
Request Method: GET
Status Code: 307 Internal Redirect
Referrer Policy: strict-origin-when-cross-origin
Response:
HTTP/1.1 307 Internal Redirect
Location: https://localhost:8080/
Non-Authoritative-Reason: HSTS
I’ve searched and looked through all the settings in brave but can’t seem to find one that can help. I also disabled shields for localhost and tried allowing insecure content. No change.
Disabling all extensions did not help.