Skip to content

Instantly share code, notes, and snippets.

@allanlei
Created June 11, 2013 04:34
Show Gist options
  • Save allanlei/5754495 to your computer and use it in GitHub Desktop.
Save allanlei/5754495 to your computer and use it in GitHub Desktop.
Config for gunicorn on Heroku. Fixes HTTPS(wsgi.url_scheme, Django's request.is_secure() and Flask's request.is_secure) and REMOTE_ADDR
forwarded_allow_ips = '*'
x_forwarded_for_header = 'X-FORWARDED-FOR'
secure_scheme_headers = {
'X-FORWARDED-PROTO': 'https',
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment