Created
September 21, 2014 15:49
-
-
Save v1nc3ntlaw/8ebfa3b5cf3391ae311c to your computer and use it in GitHub Desktop.
heroku-buildpack-php heroku-php-nginx -C nginx_app.conf redirect all http to https
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
# https://devcenter.heroku.com/articles/http-routing#heroku-headers | |
# http://wiki.nginx.org/HttpCoreModule#.24http_HEADER | |
# redirect all http to https with 301 | |
if ( $http_x_forwarded_proto = http ) { | |
return 301 https://$host$request_uri; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment