diff --git a/modules/openstack_project/templates/mirror.vhost.erb b/modules/openstack_project/templates/mirror.vhost.erb index 9e7452e21f..b46f8cb83b 100644 --- a/modules/openstack_project/templates/mirror.vhost.erb +++ b/modules/openstack_project/templates/mirror.vhost.erb @@ -51,6 +51,16 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %> RewriteCond %{DOCUMENT_ROOT}/npm/$1/$1$2 -d RewriteRule ^/npm/([^/])([^/]*)(/.*)?$ /npm/$1/$1$2$3 [L] + # TODO(jhesketh): Remove this after bandersnatch implements pep503 + # https://bitbucket.org/pypa/bandersnatch/pull-requests/20/fully-implement-pep-503-normalization/diff + # Try again but replacing -'s with .'s + RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI} !-f + RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI} !-d + RewriteRule (.*)-(.*) $1.$2 + RewriteCond %{REQUEST_URI} ^/pypi/simple/([^/])([^/]*) + RewriteCond %{DOCUMENT_ROOT}/pypi/simple/$1/$1$2 -d + RewriteRule ^/pypi/simple/([^/])([^/]*)(/.*)?$ /pypi/simple/$1/$1$2$3 [L] + \/npm\/[^/]+\/.*"> DirectoryIndex index.json AddOutputFilterByType SUBSTITUTE application/json