Update default.conf

This commit is contained in:
2026-04-24 12:08:59 +05:30
parent 9aaffae1c6
commit 7bee838bb0

View File

@@ -26,6 +26,20 @@ server {
root /usr/share/nginx/html;
index index.html;
# Firebase Auth redirect handler — proxied through own domain so Safari ITP
# does not block storage access on firebaseapp.com (cross-site tracker).
# authDomain in firebase config must be set to this server's domain.
# MUST be before static asset caching rules so /__/auth/*.js isn't intercepted.
location ~ ^/__/ {
proxy_pass https://grateful-journal-491109.firebaseapp.com;
proxy_http_version 1.1;
proxy_ssl_server_name on;
proxy_set_header Host grateful-journal-491109.firebaseapp.com;
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;
}
# Cache hashed static assets (JS/CSS/fonts) for 1 year — Vite adds content hashes
location ~* \.(js|css|woff|woff2|ttf|eot|otf)$ {
expires 1y;
@@ -40,19 +54,6 @@ server {
try_files $uri =404;
}
# Firebase Auth redirect handler — proxied through own domain so Safari ITP
# does not block storage access on firebaseapp.com (cross-site tracker).
# authDomain in firebase config must be set to this server's domain.
location ~ ^/__/ {
proxy_pass https://grateful-journal-491109.firebaseapp.com;
proxy_http_version 1.1;
proxy_ssl_server_name on;
proxy_set_header Host grateful-journal-491109.firebaseapp.com;
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/ {
client_max_body_size 5m;
proxy_pass http://backend:8001/api/;