diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index 29463e9202..8fe899a1dc 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -21,7 +21,6 @@ const profileTarget = { stage: '', pro: 'http://pathfinder.affine.pro', local: '127.0.0.1:3000', - rem: 'stage.affine.pro', }; const getRedirectConfig = profile => { diff --git a/apps/web/src/shared/apis.ts b/apps/web/src/shared/apis.ts index bd30f5f159..00b9a9283c 100644 --- a/apps/web/src/shared/apis.ts +++ b/apps/web/src/shared/apis.ts @@ -15,6 +15,9 @@ if (typeof window === 'undefined') { } else { console.warn('serverAPI is not a valid URL', config.serverAPI); } +} else { + const params = new URLSearchParams(window.location.search); + params.get('prefixUrl') && (prefixUrl = params.get('prefixUrl') as string); } const bareAuth = createBareClient(prefixUrl);