Created
February 8, 2017 10:05
-
-
Save Ben-Atherton/e53b128635a585af096e8a80429a49dc to your computer and use it in GitHub Desktop.
How to force HTTPS behind an Amazon Web Services Elastic Load Balancer
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 80; | |
location / { | |
if ($http_x_forwarded_proto != 'https') { | |
rewrite ^ https://$host$request_uri? permanent; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment