Skip to main content

Cloudflare

Working with Cloudflare

Steps to be followed for enabling HTTPS

  1. Find the loadbalancer CNAME that has been provisioned as a part of the environment setup by navigating to the Domains section of that environment. This can also be done using the cli.

Loadbalancer configurations

Loadbalancer configuration

  1. Add loadbalancer as a CNAME in the DNS for all the domains you want provisioned in that environment. You can use wildcard domains like *.dev.example.com as well.
  2. Enable Full SSL mode (non-strict) as per this article. This ensures traffic is secure all the way until the loadbalancer receives the traffic.
  3. Disable cloudflare proxying for ~5 minutes (grey cloud) so that the letsencrypt certificate is issued to the application. Turn it back on after 5 minutes.

Note: For a deep subdomain, ensure that the intermediate (sub-)domains have DNS entries.

Advanced Note: If you are using non-standard ports (other than 443) serving HTTP traffic, please refer to this article.

For passing custom headers to your application, please refer to this guide.