mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-12-21 07:07:05 +00:00
in the nginx override YAML file, change how proxies are specified into a mapping
This commit is contained in:
parent
04454b35c6
commit
f299825a95
@ -97,8 +97,8 @@ def make_domain_config(domain, template, template_for_primaryhost, env):
|
||||
yaml = rtyaml.load(open(nginx_conf_custom_fn))
|
||||
if domain in yaml:
|
||||
yaml = yaml[domain]
|
||||
if "proxy" in yaml:
|
||||
nginx_conf += "\tlocation / {\n\t\tproxy_pass %s;\n\t}\n" % yaml["proxy"]
|
||||
for path, url in yaml.get("proxies", {}).items():
|
||||
nginx_conf += "\tlocation %s {\n\t\tproxy_pass %s;\n\t}\n" % (path, url)
|
||||
|
||||
# Ending.
|
||||
nginx_conf += nginx_conf_parts[1]
|
||||
|
Loading…
Reference in New Issue
Block a user