Compare commits
2 Commits
a05795bb35
...
v1.4.10
| Author | SHA1 | Date | |
|---|---|---|---|
| 576d9f7a7b | |||
| af93daeddc |
@@ -1 +1 @@
|
||||
v1.4.9
|
||||
v1.4.10
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "aniworld-web",
|
||||
"version": "1.4.9",
|
||||
"version": "1.4.10",
|
||||
"description": "Aniworld Anime Download Manager - Web Frontend",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -37,6 +37,7 @@ class SetupRedirectMiddleware(BaseHTTPMiddleware):
|
||||
"/login", # Login page (needs to be accessible after setup)
|
||||
"/queue", # Queue page (for initial load)
|
||||
"/api/auth/", # All auth endpoints (setup, login, logout, register)
|
||||
"/api/setup/", # Setup API (unresolved folders, etc.)
|
||||
"/ws/connect", # WebSocket connection (needed for loading page)
|
||||
"/api/queue/", # Queue API endpoints
|
||||
"/api/downloads/", # Download API endpoints
|
||||
|
||||
@@ -443,15 +443,13 @@
|
||||
|
||||
// API client helpers
|
||||
async function fetchUnresolved() {
|
||||
// Note: /api/setup/unresolved does not require auth
|
||||
// It's accessible during the initial setup flow
|
||||
const token = localStorage.getItem('auth_token');
|
||||
if (!token) {
|
||||
window.location.href = '/login';
|
||||
return null;
|
||||
}
|
||||
const res = await fetch('/api/setup/unresolved', {
|
||||
headers: { 'Authorization': `Bearer ${token}` }
|
||||
});
|
||||
const headers = token ? { 'Authorization': `Bearer ${token}` } : {};
|
||||
const res = await fetch('/api/setup/unresolved', { headers });
|
||||
if (res.status === 401) {
|
||||
// Redirect to login only if we had a token but it expired
|
||||
localStorage.removeItem('auth_token');
|
||||
window.location.href = '/login';
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user