fix(frontend): use configured API base for direct requests

Route direct fetch calls, setup requests, gateway usage checks, and ops WebSocket connections through the configured API base instead of assuming same-origin backend paths.

Also derive OAuth callback suggestions from the configured API base so split frontend/API deployments show usable redirect URLs.
This commit is contained in:
imfangwenjie authored and Codex committed 2026-06-26 02:42:44 +08:00
1 parent 85a3b12254
commit 2a58a57a7c
13 files changed
+72 -45

No files matched your search

+2 -1
View File
@@ -2,10 +2,11 @@
* Setup API endpoints
*/
import axios from 'axios'
import { buildGatewayUrl } from './url'
// Create a separate client for setup endpoints (not under /api/v1)
const setupClient = axios.create({
baseURL: '',
baseURL: buildGatewayUrl('/').replace(/\/+$/, ''),
timeout: 30000,
headers: {
'Content-Type': 'application/json'