fix(webui): preserve reverse proxy authentication

Prevent login loops when the WebUI is protected by HTTP authentication
at a reverse proxy. Apply the fix to settings, uploads, and live streams
while retaining compatibility with existing WebUI clients.

Fixes #523
This commit is contained in:
DrSmoothl committed 2026-10-14 08:13:50 +08:00
1 parent d6dd748beb
commit 5150d83403
13 files changed
+244 -56

No files matched your search

+4 -4
View File
@@ -49,7 +49,7 @@ describe('storage API client', () => {
expect(fetchMock).toHaveBeenCalledWith(
'/api/system/storage',
expect.objectContaining({
headers: { Authorization: 'Bearer test-token' },
headers: new Headers({ 'X-SnowLuma-Token': 'test-token' }),
signal: expect.any(AbortSignal),
}),
);
@@ -82,10 +82,10 @@ describe('storage API client', () => {
expect.objectContaining({
method: 'POST',
body: JSON.stringify({ logRetainDays: 0 }),
headers: {
Authorization: 'Bearer test-token',
headers: new Headers({
'X-SnowLuma-Token': 'test-token',
'Content-Type': 'application/json',
},
}),
signal: expect.any(AbortSignal),
}),
);