FiloSottile/mkcert

How can I prevent this automatic redirection from HTTP to HTTPS?

jon9090 opened this issue · 7 comments

To generate a certificate for localhost, I ran the following commands:

brew install mkcert
mkcert --install
mkcert localhost

This created the .crt and .key files, which I then used in my applications (https://localhost:4300).

However, I've noticed that when I open an application that doesn't require HTTPS, it automatically redirects to HTTPS (http://localhost:4200).

How can I prevent this automatic redirection from HTTP to HTTPS?

Its not the certificate

This redirect could be because of several things.

  1. some web and proxy servers have rules to redirect http to https e.g apache has .htaccess url files
  2. web browsers have started to have a builtin features to redirect http to https you can disable in the browser's config.
    however, the browser normally checks if the https version of the site exists if not, it stays with the http version of the site.
  3. some browser plugins/extensions offer the same feature as no 2
  4. if developing software it is possible that some libraries or project code can also redirect.

so it could be one or more of these. It current sounds like 1 or 4
Its also depend on what you are using in your dev environment.