Support devpi as the upstream pip server

devpi serves packages from url starting +f/. The devpi source code
suggets that +e may also be used but is not seen when using devpi
as a caching proxy.

Change-Id: Ib391d17e5038a355a558aa3f041ed58ede7dad4a
This commit is contained in:
Jonathan Rosser 2018-05-11 13:34:14 +01:00
parent 14254375b1
commit bcb29bd5c5
1 changed files with 8 additions and 0 deletions

View File

@ -44,6 +44,14 @@ server {
error_page 404 = @pypi;
}
location /+f {
{% if repo_nginx_pypi_upstream | match('.*:443$') %}
proxy_pass https://pypi;
{% else %}
proxy_pass http://pypi;
{% endif %}
}
location / {
root {{ repo_service_home_folder }}/repo/;
autoindex on;