Skip to content

Instantly share code, notes, and snippets.

@baylisscg
Created March 22, 2011 22:10
Show Gist options
  • Save baylisscg/882197 to your computer and use it in GitHub Desktop.
Save baylisscg/882197 to your computer and use it in GitHub Desktop.
Nginx config snippet.
# Take the $scheme variable and set $is_ssl to either "on" or "off"
# depending on whether HTTPS is in use. ( Defaults to OFF )
map $scheme $is_ssl {
default off;
http off;
https on;
}
@baylisscg
Copy link
Author

Creates the variable $is_ssl to on if scheme is https and off if the scheme is http or soemthing else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment