top | item 21898881

(no title)

rrosen326 | 6 years ago

How do people in general test their https during development? I've never done it but will for my current project, but am dreading it. I was thinking of Docker or Vagrant. Or maybe this localdots.

This must be a solved problem. How do you all do it?

discuss

order

benologist|6 years ago

I liked using a service called serveo that just uses SSH but recently it went offline so I am back to using either ngrok or localtunnel. These let a remotely-hosted HTTPS domain point to a local port on your computer or server you just request a URL pointing to local port X.

http://serveo.net

https://ngrok.io

https://localtunnel.me

These are command-line tools with NodeJS libraries, you can run them parallel to your project or internally. I am using the NodeJS libraries to create a URL when my tests start. Stripe recently added webhook endpoints to their API so you can also create webhooks bound to whatever URL you are assigned.

4lun|6 years ago

Self signed certificate (can generate against any domain I need) or utilising a dev specific hostname against a domain I already own, e.g. dev.mydomain.org, so that I can get a certificate most browsers trust out of the box (e.g. via letsencrypt).

Then typically I just pass through nginx to HTTP locally, which is typically what I do in prod so the config isn't new to me

scient|6 years ago

Not sure what the complexity here would be, you can set up nginx with some simple DNS (or even hosts file) stuff and run HTTP locally.

Something like puma-dev does this pretty painlessly out of the box too. Running a container just for that seems frankly overkill.

checker|6 years ago

Yeah containers are the way to go. Run a sidecar proxy such as Envoy and you can offload the TLS at the proxy so you don't have to write any TLS code yourself.