Merge branch 'feat/api-prefix'
# Conflicts: # apps/events/CHANGELOG.md
This commit is contained in:
@@ -72,7 +72,10 @@ export function resolveToApiOrigin(urlOrPath: string | null | undefined): string
|
||||
} catch {
|
||||
// fall through to relative handling
|
||||
}
|
||||
return API_BASE ? `${API_BASE}${raw}` : raw;
|
||||
// Stored uploads ("/uploads/…") are served under /api/uploads (2.3.0), so they reach the
|
||||
// backend when the site and its API share one address.
|
||||
const path = raw.startsWith("/uploads/") ? `/api${raw}` : raw;
|
||||
return API_BASE ? `${API_BASE}${path}` : path;
|
||||
}
|
||||
|
||||
// The parsed JSON body of a failed request — v1 sends `message` (some routes add a
|
||||
|
||||
Reference in New Issue
Block a user