Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to force HTTPS behind an Amazon Web Services Elastic Load Balancer
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