fix some for api download pic
This commit is contained in:
@@ -10,6 +10,16 @@ server {
|
||||
# after the api container restarts with a new IP.
|
||||
resolver 127.0.0.11 valid=10s ipv6=off;
|
||||
|
||||
location ^~ /api/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 /api/ {
|
||||
set $api_upstream http://goldbank-api:3000;
|
||||
proxy_pass $api_upstream$request_uri;
|
||||
@@ -24,7 +34,8 @@ server {
|
||||
# API's own static handler (main.ts useStaticAssets), not stored here —
|
||||
# without this the ProductImage.url values the admin panel renders
|
||||
# (/uploads/<file>) 404 through this nginx instead of reaching the API.
|
||||
location /uploads/ {
|
||||
# ^~ beats the static-file regex so /uploads/*.png is not served from html root.
|
||||
location ^~ /uploads/ {
|
||||
set $api_upstream http://goldbank-api:3000;
|
||||
proxy_pass $api_upstream$request_uri;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
Reference in New Issue
Block a user