Proxy to the storage directly
No need to strip and re-add a portion of the URL when proxying.
@@ -20,11 +20,9 @@ server {
}
# Sendfile support to serve the actual files that Proxito has specified
- location /proxito/devstoreaccount1/media/ {
+ location /proxito/ {
internal;
- # Nginx will strip the `/proxito/devstoreaccount1/media/` and pass just the `html/$proj/$ver/$filename`
- # So we need to make sure we pass it to `/devstoreaccount1/media/` for the proper URL
- proxy_pass http://storage:10000/devstoreaccount1/media/;
+ proxy_pass http://storage:10000/;
proxy_set_header Host storage:10000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
