I am developing a payment application that requires a secure connection so I am using the following for local development:
config :app_web, AppWeb.Endpoint, https: [ port: 4001, cipher_suite: :strong, keyfile: "priv/cert/selfsigned_key.pem", certfile: "priv/cert/selfsigned.pem" ]
The application starts fine but when I attempt to load the application in Safari I see “Safari Can’t connect to the server” in bold followed by “Safari can’t open the page “https://dev.localhost:4001” because Safari can’t connect to the server “dev.localhost””. I have mapped 127.0.0.1 in my host such that dev.localhost should resolve and it does for a non-secure (http) request using post 4000. The certs are present as I have run
mix phx.gen.cert. Chrome also does not load the site and displays:
This site can’t be reached **dev.localhost** refused to connect.
My OS is macOS Big Sur and Safari version is 14.0.2. Any help would be great.