Merge "Use correct protocol for pypi reverse proxy"

This commit is contained in:
Zuul 2018-03-11 19:44:08 +00:00 committed by Gerrit Code Review
commit 4a20269dc7
1 changed files with 4 additions and 0 deletions

View File

@ -25,7 +25,11 @@ server {
# http://linuxplayer.org/2013/06/nginx-try-files-on-multiple-named-location-or-server
location @pypi {
proxy_set_header Host pypi.python.org;
{% if repo_nginx_pypi_upstream | match('.*:443$') %}
proxy_pass https://pypi;
{% else %}
proxy_pass http://pypi;
{% endif %}
}
location /simple {