Skip to content

Instantly share code, notes, and snippets.

@CyrilPeponnet
Created January 27, 2016 02:39
Show Gist options
  • Save CyrilPeponnet/87ab289afb3bfcb2f7cf to your computer and use it in GitHub Desktop.
Save CyrilPeponnet/87ab289afb3bfcb2f7cf to your computer and use it in GitHub Desktop.
frontend http-in
bind :80 name http
mode http
reqadd X-Forwarded-Proto:\ http
use_backend bk_letsencrypt if { hdr(host) -i host.domain.tld } { path_beg -i /.well-known/acme-challenge }
redirect scheme https code 301 if !{ ssl_fc }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment