From 3ae40bf1f68ec428e5f576c8a316ec6402bce27f Mon Sep 17 00:00:00 2001 From: xLima12 Date: Wed, 6 May 2026 22:52:55 -0300 Subject: [PATCH] fix: resolve mixed content on login and static asset routing --- frontend/nginx.conf | 1 + frontend/src/config.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/nginx.conf b/frontend/nginx.conf index 266f2cf..37c4a04 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -26,6 +26,7 @@ server { # Cache static assets location ~* \.(?:ico|css|js|gif|jpe?g|png|woff2?|eot|ttf|svg)$ { + try_files $uri =404; expires 6M; access_log off; add_header Cache-Control "public, max-age=15552000, immutable"; diff --git a/frontend/src/config.js b/frontend/src/config.js index feea82c..517157e 100644 --- a/frontend/src/config.js +++ b/frontend/src/config.js @@ -1,4 +1,4 @@ const envApiUrl = import.meta.env.VITE_API_URL; const isTestMode = import.meta.env.MODE === 'test'; -export const API_URL = envApiUrl || (isTestMode ? 'http://localhost:8080' : 'http://localhost:8080'); +export const API_URL = envApiUrl || (isTestMode || import.meta.env.DEV ? 'http://localhost:8080' : '');