Files
explore/lib/api/isNeedProxy.ts
T
tom goriunovandGitHub e3551038af app feature list (#1079)
* metadata helpers and values for txs pages

* update titles to the rest of the pages

* refactor getServerSideProps

* dynamically update metadata for token and dapp page

* test

* 404 error page

* make new config

* make use of new config, delete old one

* feature reporter: dev implementation

* feature reporter: docker integration

* resctructure ENVS.md

* sentry feature

* refinements

* add spaces between sections

* tweaks

* switch to camelCase

* clean up

* remove NEXT_PUBLIC_NETWORK_TOKEN_ADDRESS

* v
2023-08-09 15:39:36 -04:00

14 lines
439 B
TypeScript

import config from 'configs/app';
// FIXME
// I was not able to figure out how to send CORS with credentials from localhost
// unsuccessfully tried different ways, even custom local dev domain
// so for local development we have to use next.js api as proxy server
export default function isNeedProxy() {
if (config.app.useProxy) {
return true;
}
return config.app.host === 'localhost' && config.app.host !== config.api.host;
}