mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-05 03:02:56 +00:00
de day #74
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
# Allow larger uploads (default is 1MB) – must be >= backend MAX_UPLOAD_SIZE
|
||||
client_max_body_size 50m;
|
||||
|
||||
# Enable gzip compression for text-based assets
|
||||
gzip on;
|
||||
@@ -78,6 +80,8 @@ server {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Accept-Encoding gzip;
|
||||
# Ensure Nginx accepts large uploads on this route as well
|
||||
client_max_body_size 50m;
|
||||
|
||||
# Enable buffering for better performance
|
||||
proxy_buffering on;
|
||||
@@ -86,6 +90,24 @@ server {
|
||||
proxy_busy_buffers_size 8k;
|
||||
}
|
||||
|
||||
# Short links and tracked redirect - must bypass SPA and hit backend
|
||||
location ^~ /s/ {
|
||||
proxy_pass http://backend:8080;
|
||||
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 = /r {
|
||||
proxy_pass http://backend:8080;
|
||||
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;
|
||||
}
|
||||
|
||||
# Proxy backend-served assets so the frontend can use relative URLs
|
||||
location /uploads/ {
|
||||
proxy_pass http://backend:8080;
|
||||
|
||||
Reference in New Issue
Block a user