Commit cc77b9e
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>1 parent 4ec87e1 commit cc77b9e
1 file changed
Lines changed: 1 addition & 1 deletion
| 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