Commit 4ec4de1
fix(web): prevent crash when User-Agent header is missing (#1309)
* fix(web): prevent crash when User-Agent header is missing
When anonymous access is enabled, session-less requests fall through to
the (app) layout's mobile-detection check instead of redirecting to
/login. Requests without a User-Agent header (e.g. proxy/health-check
probes) caused getSelectorsByUserAgent('') to return undefined, throwing
a TypeError on the isMobile destructure and crashing the web UI.
Only call getSelectorsByUserAgent when a non-empty User-Agent is present.
Fixes #1308
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs: add CHANGELOG entry for #1309
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 4ec87e1 commit 4ec4de1
2 files changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
0 commit comments