Archive

Archive for September, 2019

Docker Compose Local HTTPS with nginx or Caddy and mkcert

September 6, 2019 Leave a comment

Why run your project with HTTPS locally?
In most instances, your production site will run with TLS/SSL enabled, ie. over HTTPS. This tends not to be a concern of your application, ie the SSL termination is dealt with at the ingress/reverse-proxy/load-balancer level.

However your application may rely on the assumption that it’s running over an SSL connection. For example, the Set-Cookie header has a Secure attribute which means the cooke will only be sent over a TLS/SSL connection. That means that locally, you would need the code to fork to enable sending of cookie over non TLS/SSL connection, in other words if environment = local => don’t enable Secure.

https://codewithhugo.com/docker-compose-local-https/

Advertisements
Categories: Interesting