Merge pull request #3089 from omnivore-app/feat/api-specify-home-url

Use CLIENT_URL instead of hard coded values
This commit is contained in:
Jackson Harper
2023-11-09 08:54:04 +08:00
committed by GitHub
2 changed files with 3 additions and 14 deletions

View File

@ -3,16 +3,5 @@ import { getEnv } from './util'
export const env = getEnv()
export function homePageURL(): string {
switch (env.server.apiEnv) {
case 'local':
return 'http://localhost:3000'
case 'demo':
return 'https://demo.omnivore.app'
case 'qa':
return 'https://web-dev.omnivore.app'
case 'prod':
return 'https://omnivore.app'
}
return 'https://omnivore.app'
return env.client.url
}

View File

@ -2,7 +2,6 @@ import { env } from '../env'
export const corsConfig = {
credentials: true,
// allow https://studio.apollographql.com for local env
origin: [
'https://omnivore.app',
'https://dev.omnivore.app',
@ -11,8 +10,9 @@ export const corsConfig = {
'https://web-dev.omnivore.app',
'https://web-demo.omnivore.app',
'http://localhost:3000',
'lsp://logseq.io',
env.dev.isLocal && 'https://studio.apollographql.com',
env.client.url,
'lsp://logseq.io',
'app://obsidian.md',
],
}