feat: use relative path for api (#5520)

This commit is contained in:
DarkSky
2024-01-05 14:01:25 +00:00
parent b86a5a2830
commit 9650a5a6a1
2 changed files with 3 additions and 3 deletions

View File

@@ -377,7 +377,7 @@ export const createConfiguration: (
},
proxy: {
'/api/worker/': {
target: 'https://affine-worker.toeverything.workers.dev',
target: 'https://affine.fail',
changeOrigin: true,
secure: false,
},

View File

@@ -18,7 +18,7 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
enableDebugPage: true,
changelogUrl: 'https://affine.pro/what-is-new',
downloadUrl: 'https://affine.pro/download',
imageProxyUrl: 'https://workers.toeverything.workers.dev/proxy/image',
imageProxyUrl: '/api/worker/image-proxy',
enablePreloading: true,
enableNewSettingModal: true,
enableNewSettingUnstableApi: false,
@@ -60,7 +60,7 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
enableDebugPage: true,
changelogUrl: 'https://github.com/toeverything/AFFiNE/releases',
downloadUrl: 'https://affine.pro/download',
imageProxyUrl: 'https://workers.toeverything.workers.dev/proxy/image',
imageProxyUrl: '/api/worker/image-proxy',
enablePreloading: true,
enableNewSettingModal: true,
enableNewSettingUnstableApi: false,