You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**PROBLEM:** Huntarr broke when deployed in subdirectories (e.g., `domain.com/huntarr/`) due to absolute URL references that failed in subpath environments.
259
+
260
+
**SYMPTOMS:**
261
+
- Application works at root domain (`domain.com`) but fails in subdirectories
262
+
- Navigation redirects break (redirect to wrong URLs)
263
+
- CSS/JS resources fail to load
264
+
- API calls return 404 errors
265
+
- Setup process gets stuck
266
+
267
+
### 🔧 Critical Fix Patterns from PR #527
268
+
269
+
#### 1. JavaScript Navigation URLs - HIGH PRIORITY
270
+
**❌ BROKEN:**
271
+
```javascript
272
+
// Absolute URLs break in subpaths
273
+
window.location.href='/'; // Redirects to domain.com instead of domain.com/huntarr/
274
+
```
275
+
276
+
**✅ FIXED:**
277
+
```javascript
278
+
// Relative URLs work in all environments
279
+
window.location.href='./'; // Correctly redirects to current subpath
280
+
```
281
+
282
+
**Files to Check:**
283
+
-`/frontend/static/js/new-main.js` - Settings save redirects
**LESSONLEARNED:** Subpath compatibility issues are SILENTFAILURES that only surface in production reverse proxy environments. Always test with subpath configurations before deploying.
0 commit comments