[ARVADOS] updated: 1.1.4-600-gf9a05f61a
Git user
git at public.curoverse.com
Fri Jul 13 13:25:01 EDT 2018
Summary of changes:
sdk/python/tests/nginx.conf | 20 ++++++++++++++++++--
sdk/python/tests/run_test_server.py | 2 +-
2 files changed, 19 insertions(+), 3 deletions(-)
via f9a05f61abdf33891b09d62205d009d1cae73d1b (commit)
from 224ac505b1162837f2f84fe2735a959d71bd5ce9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit f9a05f61abdf33891b09d62205d009d1cae73d1b
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date: Fri Jul 13 13:24:07 2018 -0400
13497: Add comments on odd Nginx config. Less confusing vhost name.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>
diff --git a/sdk/python/tests/nginx.conf b/sdk/python/tests/nginx.conf
index 432326171..c21ef95f2 100644
--- a/sdk/python/tests/nginx.conf
+++ b/sdk/python/tests/nginx.conf
@@ -67,10 +67,26 @@ http {
ssl_certificate_key "{{SSLKEY}}";
location / {
proxy_pass http://keep-web;
- proxy_set_header Host download:{{KEEPWEBPORT}};
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
- proxy_redirect https://download:{{KEEPWEBPORT}}/ https://$host:{{KEEPWEBDLSSLPORT}}/;
+
+ # Unlike other proxy sections, here we need to override the
+ # requested Host header and use proxy_redirect because of the
+ # way the test suite orchestrates services. Keep-web's "download
+ # only" behavior relies on the Host header matching a configured
+ # value, but when run_test_servers.py writes keep-web's command
+ # line, the keep-web-dl TLS port (which clients will connect to
+ # and include in their Host header) has not yet been assigned.
+ #
+ # In production, "proxy_set_header Host $http_host;
+ # proxy_redirect off;" works: keep-web's redirect URLs will
+ # match the request URL received by Nginx.
+ #
+ # Here, keep-web will issue redirects to https://download/ and
+ # Nginx will rewrite them.
+ #
+ proxy_set_header Host download;
+ proxy_redirect https://download/ https://$host:{{KEEPWEBDLSSLPORT}}/;
}
}
upstream ws {
diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py
index 6e99f23d7..102433cd4 100644
--- a/sdk/python/tests/run_test_server.py
+++ b/sdk/python/tests/run_test_server.py
@@ -639,7 +639,7 @@ def run_keep_web():
keepweb = subprocess.Popen(
['keep-web',
'-allow-anonymous',
- '-attachment-only-host=download:'+str(keepwebport),
+ '-attachment-only-host=download',
'-listen=:'+str(keepwebport)],
env=env, stdin=open('/dev/null'), stdout=logf, stderr=logf)
with open(_pidfile('keep-web'), 'w') as f:
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list