fix: delete not working with a reverse-proxy with path prefix #1064

Massimo Melina committed Aug 19, 2025 at 22:15 UTC 6902f2aa3a3bd6bfe5deb5063b26aea150744136
1 file changed +1 -1
shared/api.ts
+1 -1
@@ -43,7 +43,7 @@ export function apiCall<T=any>(cmd: string, params?: Dict, options: ApiCallOptio
43 const asRest = options.restUri
44 const started = new Date
45 // rebuilding the whole url makes it resistant to url-with-credentials
46 - return Object.assign(fetch(`${location.origin}${getPrefixUrl()}${asRest || (API_URL + cmd)}`, {
46 + return Object.assign(fetch(`${location.origin}${asRest || (getPrefixUrl() + API_URL + cmd)}`, {
47 method: asRest ? cmd : (options.method || 'POST'),
48 headers: { 'content-type': 'application/json', 'x-hfs-anti-csrf': '1' },
49 signal: controller.signal,