Created
March 22, 2011 22:10
-
-
Save baylisscg/882197 to your computer and use it in GitHub Desktop.
Nginx config snippet.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Creates the variable
$is_ssl
toon
if scheme ishttps
andoff
if the scheme ishttp
or soemthing else.