2022-09-06 14:14:45 +00:00
|
|
|
require('dotenv').config({ path: ['.env', process.env.NODE_ENV].filter(Boolean).join('.') });
|
2022-04-25 08:20:58 +00:00
|
|
|
|
2022-09-25 16:49:45 +00:00
|
|
|
const { PROXY_TARGET } = process.env;
|
|
|
|
const REQUIRED_ENV = [PROXY_TARGET];
|
2022-01-11 17:07:27 +00:00
|
|
|
|
2022-09-25 16:49:45 +00:00
|
|
|
if (REQUIRED_ENV.findIndex((e) => !e) !== -1) {
|
|
|
|
throw new Error('[proxy.conf.js] Set required environment variables!');
|
|
|
|
}
|
2022-01-11 17:07:27 +00:00
|
|
|
|
2022-09-25 16:49:45 +00:00
|
|
|
module.exports = [
|
|
|
|
{
|
|
|
|
context: [
|
|
|
|
'/v1',
|
|
|
|
'/v3',
|
|
|
|
'/stat',
|
|
|
|
'/fistful',
|
|
|
|
'/file_storage',
|
|
|
|
'/deanonimus',
|
|
|
|
'/payout/management',
|
|
|
|
'/wachter',
|
|
|
|
],
|
|
|
|
target: PROXY_TARGET,
|
|
|
|
secure: false,
|
|
|
|
logLevel: 'debug',
|
|
|
|
changeOrigin: true,
|
|
|
|
},
|
|
|
|
];
|