Pass host to apostille (required for k8s ingress)

This commit is contained in:
Evan Cordell 2017-02-23 18:13:02 -05:00
parent f42200a303
commit ecd441269b
2 changed files with 4 additions and 0 deletions

View file

@ -30,13 +30,16 @@ def generate_server_config(config):
"""
if config:
tuf_server = config.get('TUF_SERVER', None)
tuf_host = config.get('TUF_HOST', None)
signing_enabled = config.get('FEATURE_SIGNING', False)
else:
tuf_server = None
tuf_host = None
signing_enabled = False
write_config('conf/nginx/server-base.conf',
tuf_server=tuf_server,
tuf_host=tuf_host,
signing_enabled=signing_enabled)

View file

@ -83,6 +83,7 @@ location /secscan/ {
location ~ ^/v2/(.+)/_trust/tuf/(.*)$ {
set $upstream_tuf {{ tuf_server }};
proxy_pass $upstream_tuf$uri;
proxy_set_header Host "{{ tuf_host }";
}
{% endif %}