fix some for api download pic

This commit is contained in:
Montech
2026-09-19 15:44:00 +03:30
parent 7227e9c61b
commit 79226c9f13
247 changed files with 409 additions and 199 deletions
+14 -1
View File
@@ -10,6 +10,19 @@ server {
# after the api container restarts with a new IP.
resolver 127.0.0.11 valid=10s ipv6=off;
# /api/uploads/* must win over /api/ so files are not handled as Nest JSON
# routes. ^~ also beats the static-file regex below (which would otherwise
# try to serve /uploads/*.png from this nginx html root and 404).
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;
@@ -23,7 +36,7 @@ server {
# 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/ {
location ^~ /uploads/ {
set $api_upstream http://goldbank-api:3000;
proxy_pass $api_upstream$request_uri;
proxy_http_version 1.1;