FIx some for nginx
This commit is contained in:
@@ -20,6 +20,19 @@ server {
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
# Product images and other uploads are served by the API (main.ts
|
||||
# useStaticAssets at /uploads/), not by this nginx. Without this proxy the
|
||||
# ProductImage.url values the UI renders would 404.
|
||||
location /uploads/ {
|
||||
set $api_upstream http://goldbank-api:3000;
|
||||
proxy_pass $api_upstream$request_uri;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user