Created
December 20, 2017 18:20
-
-
Save april/2319fcedbfd92a0f6b5dfc7f0d0b2bd4 to your computer and use it in GitHub Desktop.
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
server { | |
listen 58080; | |
# Disable the port number in redirects, since it's behind a load balancer | |
port_in_redirect off; | |
location / { | |
if ($http_x_forwarded_proto != 'https') { | |
return 301 https://$host$request_uri; | |
} | |
} | |
location /__lbheartbeat__ { | |
access_log off; | |
default_type text/plain; | |
return 200 'OK'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment