Files
explore/lib/api/isNeedProxy.ts
T
tom goriunovandGitHub fae4990e1f API resource refactoring (#2699)
* add prefix to API resources

* fix pw tests

* refactor config

* remove unnecessary prefixes in resource names

* fixes

* update screenshots
2025-05-01 15:22:38 +02:00

14 lines
448 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.apis.general.host;
}