fix(frontend): prefix auth API requests with VITE_PUBLIC_APP_URL for cross-origin Workers hosting
CI / test (push) Successful in 1m32s
CI / docker (push) Successful in 54s

This commit is contained in:
zwitschi committed 2026-08-16 09:26:35 +02:00
1 parent 53a0c3c825
commit 5585a6ecc3
10 files changed
+54 -28

No files matched your search

+2 -1
View File
@@ -428,7 +428,8 @@ async function submitAuth(path: string) {
return;
}
try {
const res = await fetch(path, {
const apiUrl = import.meta.env.VITE_PUBLIC_APP_URL?.trim() || window.location.origin;
const res = await fetch(`${apiUrl}${path}`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ username: u, password: p }),