Commit 08becf7f authored by Joshua Tauberer's avatar Joshua Tauberer

the hidden feature for proxying web requests now sets X-Forwarded-For

parent 5eb4a53d
...@@ -5,6 +5,7 @@ In Development ...@@ -5,6 +5,7 @@ In Development
-------------- --------------
* Update Roundcube to version 1.3.4 and Z-Push to version 2.3.9. * Update Roundcube to version 1.3.4 and Z-Push to version 2.3.9.
* The undocumented feature for proxying web requests to another server now sets X-Forwarded-For.
v0.26c (February 13, 2018) v0.26c (February 13, 2018)
-------------------------- --------------------------
......
...@@ -149,7 +149,10 @@ def make_domain_config(domain, templates, ssl_certificates, env): ...@@ -149,7 +149,10 @@ def make_domain_config(domain, templates, ssl_certificates, env):
# any proxy or redirect here? # any proxy or redirect here?
for path, url in yaml.get("proxies", {}).items(): for path, url in yaml.get("proxies", {}).items():
nginx_conf_extra += "\tlocation %s {\n\t\tproxy_pass %s;\n\t}\n" % (path, url) nginx_conf_extra += "\tlocation %s {" % path
nginx_conf_extra += "\n\t\tproxy_pass %s;" % url
nginx_conf_extra += "\n\t\tproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;"
nginx_conf_extra += "\n\t}\n"
for path, url in yaml.get("redirects", {}).items(): for path, url in yaml.get("redirects", {}).items():
nginx_conf_extra += "\trewrite %s %s permanent;\n" % (path, url) nginx_conf_extra += "\trewrite %s %s permanent;\n" % (path, url)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment