Skip to content

Instantly share code, notes, and snippets.

@v1nc3ntlaw
Created September 21, 2014 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save v1nc3ntlaw/8ebfa3b5cf3391ae311c to your computer and use it in GitHub Desktop.
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
# 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