Main logic
This commit is contained in:
15
proxy.conf.cjs
Normal file
15
proxy.conf.cjs
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Прокси для `ng serve`. Целевой backend задаётся в `.env` (SG_DEV_PROXY_TARGET).
|
||||
*/
|
||||
const path = require('path');
|
||||
require('dotenv').config({ path: path.join(__dirname, '.env') });
|
||||
|
||||
const target = process.env.SG_DEV_PROXY_TARGET || 'http://sparkguardian.ru:8080';
|
||||
|
||||
module.exports = {
|
||||
'/api/**': {
|
||||
target,
|
||||
secure: false,
|
||||
changeOrigin: true,
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user