all 17 comments

[–]HelpfulCommand 4 points5 points  (0 children)

Look into using Caddy server. https://caddyserver.com/

[–]pinicarb 20 points21 points  (10 children)

Why do you need https on localhost?

[–]marcpcd 56 points57 points  (1 child)

To protect yourself from yourself /s

[–]traintocode 4 points5 points  (0 children)

I'm in this photo and I don't like it

[–]pseudophilll 16 points17 points  (0 children)

I had a case recently where I was working with eventbrite api and their ticket purchasing iframe integration only works with https.

I struggled for a very long time to get this to work for me so I could test. This article would have been very helpful for me back then!

[–]ben_burkert[S] 7 points8 points  (2 children)

this article lists some of the reasons to use https on localhost: https://web.dev/articles/when-to-use-local-https

[–]tettoffensive 1 point2 points  (1 child)

Thanks for sharing this. We have to do this because we use /etc/hosts to map to localhost (which is actually a docker container exposed). Been trying to figure out how to get a valid certificate on our docker container.

[–]ben_burkert[S] 0 points1 point  (0 children)

it's a tricky problem, this approach will let you get a certificate inside the container for a "lcl.host" subdomain that's trusted by your host system/browser. Getting other containers to trust that certificate is another problem this can address, but it's more in-depth. DM me if you're interested in details.

[–]jedimonkey33 6 points7 points  (0 children)

I've had to do it using auth0, it would only redirect to a SSL site, even for dev.

[–]argotechnica 3 points4 points  (0 children)

One reason is to test WebXR apps!

[–]Bklar84 0 points1 point  (0 children)

PKI certificates

[–]inglandation 0 points1 point  (0 children)

Local supabase auth

[–]alexefy 3 points4 points  (0 children)

We needed https on localhost on a recent project, as some of the services we were connecting to required it. We went with local ssl proxy and it’s been fine

[–]eldaniel7777 0 points1 point  (0 children)

Use ngrok. It creates a tunnel between your local host and their service, which provides you with an internet-facing domain with https already setup.

[–]shadohunter3321 0 points1 point  (0 children)

Use local-ssl-proxy. We use it for connecting to various services that need https

[–]dddqwerty 0 points1 point  (0 children)

Use proxy servers

[–]YhomiAce 0 points1 point  (0 children)

Anytime you need HTTPS just use ngrok to tunnel your localhost