2022-06-18 17:39:22 -05:00
|
|
|
const { createProxyMiddleware } = require('http-proxy-middleware');
|
|
|
|
|
|
|
|
|
|
const context = [
|
2022-06-25 14:23:41 -05:00
|
|
|
'/api/seasons',
|
|
|
|
|
'/api/characters',
|
|
|
|
|
'/api/quotes',
|
|
|
|
|
'/api/episodes'
|
2022-06-18 17:39:22 -05:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
module.exports = function (app) {
|
|
|
|
|
const appProxy = createProxyMiddleware(context, {
|
2022-06-18 17:50:54 -05:00
|
|
|
target: 'https://localhost:7021',
|
2022-06-18 17:39:22 -05:00
|
|
|
secure: false
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
app.use(appProxy);
|
|
|
|
|
};
|