fix(auth): secure sessions and app routing

Validate sessions against the API, honor configurable base paths, and route unknown pages to 404. Keep development ports stable so user and admin apps cannot be confused.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-09-24 20:14:11 +03:30
co-authored by Copilot
parent 83edf721ba
commit 9854842ada
45 changed files with 285 additions and 184 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
# Same-origin in dev (Vite proxies to the real API — avoids CORS)
VITE_API_BASE_URL=/server/api
VITE_API_BASE_URL=https://nademitex.montest.ir/server/api
# بدون سرور هم می‌شود وارد شد
VITE_USE_MOCK_AUTH=true
VITE_USE_MOCK_AUTH=false
VITE_BASE_PATH=/admin/