Skip to content

Commit

Permalink
Merge pull request benoitc#1205 from benoitc/forwarded_allow_ips_env
Browse files Browse the repository at this point in the history
$FORWARDED_ALLOW_IPS
  • Loading branch information
benoitc committed Feb 11, 2016
2 parents c528e2d + 11f2bb5 commit a35de46
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gunicorn/config.py
Expand Up @@ -1014,14 +1014,17 @@ class ForwardedAllowIPS(Setting):
cli = ["--forwarded-allow-ips"]
meta = "STRING"
validator = validate_string_to_list
default = "127.0.0.1"
default = os.environ.get("FORWARDED_ALLOW_IPS", "127.0.0.1")
desc = """\
Front-end's IPs from which allowed to handle set secure headers.
(comma separate).
Set to ``*`` to disable checking of Front-end IPs (useful for setups
where you don't know in advance the IP address of Front-end, but
you still trust the environment).
By default, the value of the ``FORWARDED_ALLOW_IPS`` environment
variable. If it is not defined, the default is ``"127.0.0.1"``.
"""


Expand Down

0 comments on commit a35de46

Please sign in to comment.