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)
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
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.
I saw that a beta was available and so downloaded that. It worked.
I have been having this issue for a few months now and so didn’t think it was a version issue.
I reset all settings on Brave in my existing installation and it worked! So there must have been some setting causing it but I have no idea which. Also strange that I have the same issue on my (synced) windows installation as well. It is possibly fixed there as well, will check later.
This setting can be cleared by using the following link and entering localhost in the Delete domain security policies
brave://net-internals/#hsts
This works but the issue will probably return the next time I use localhost.
i will try to set it permanently with this (I guess brave has something similar). It may not work but I’m happy I understand the issue and can reset it