feat: add admin login page and authentication API
CD / deploy (push) Failing after 27s
CI / test (push) Successful in 1m54s
CI / docker (push) Canceled after 0s
CI / release (push) Canceled after 0s

- Created a new login page for admin access at frontend/admin/login/index.html.
- Implemented form submission with error handling for login credentials.
- Updated frontend/index.html to mute the video player and removed unnecessary Alpine.js data binding.
- Enhanced manifest URL resolution in frontend/src/main.ts to include cache-busting parameters.
- Modified vite.config.ts to include the new admin login page in the build process.
- Updated nginx.conf to handle admin login routing, authentication, and API proxying for admin actions.
This commit is contained in:
zwitschi committed 2026-08-03 17:19:05 +02:00
1 parent 1ae0ad121b
commit 6b494a34fe
15 files changed
+1896 -52

No files matched your search

+22 -2
View File
@@ -29,12 +29,32 @@ function resolveWebSocketBaseUrl() {
function resolveManifestUrl() {
const configuredUrl = import.meta.env.VITE_PUBLIC_HLS_URL?.trim();
const cacheBust = `stream=${Date.now()}`;
const sameOriginManifestUrl = new URL(
"/hls/playlist.m3u8",
window.location.origin,
);
sameOriginManifestUrl.searchParams.set("stream", cacheBust);
const allowCrossOriginManifest =
import.meta.env.VITE_PUBLIC_HLS_CROSS_ORIGIN?.trim().toLowerCase() ===
"true";
if (configuredUrl) {
return configuredUrl;
const manifestUrl = new URL(configuredUrl);
manifestUrl.searchParams.set("stream", cacheBust);
if (
!allowCrossOriginManifest &&
manifestUrl.origin !== window.location.origin
) {
return sameOriginManifestUrl.toString();
}
return manifestUrl.toString();
}
return new URL("/hls/playlist.m3u8", window.location.origin).toString();
return sameOriginManifestUrl.toString();
}
function connectWebSocket(room: string) {