fix(frontend): prefix auth API requests with VITE_PUBLIC_APP_URL for cross-origin Workers hosting
This commit is contained in:
1 parent
53a0c3c825
commit
5585a6ecc3
10 files changed
+54
-28
No files matched your search
@@ -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 }),
|
||||
|
||||
Reference in new issue
Block a user