Files
explore/lib/api/isNeedProxy.ts
T
tom goriunovandGitHub cec9182058 Migrate from cookies to headers for scam tokens and bypassing rate li… (#3118)
Migrate from cookies to headers for scam tokens and bypassing rate limits

Resolves #3092
2025-11-17 15:55:08 +01:00

13 lines
408 B
TypeScript

import config from 'configs/app';
export default function isNeedProxy() {
if (config.app.useProxy) {
return true;
}
// ONLY FOR DEV OR REVIEW ENVIRONMENTS (NOT PRODUCTION)
// because we have some resources that require credentials, we need to use the proxy
// otherwise the cross-origin requests with "credentials: include" will be blocked
return config.app.isDev || config.app.isReview;
}