You will still get the warning when running in Chrome or Edge, as the certificate is not a trusted certificate. But you can switch off the prompt when running the site by setting the following flag:
chrome://flags/#allow-insecure-localhost
This also works also in the latest version Edge.