@rnga/orders
Version:
## Get schema from @prisma-cms 1. yarn get-api-schema -e http://localhost:4000 2. yarn build-api-fragments
68 lines (59 loc) • 1.34 kB
JavaScript
'use strict';
// module.exports = require("@prisma-cms/front/lib/setupProxy");
var proxy = require('http-proxy-middleware');
// const server = require("./server/middleware");
module.exports = function (app) {
app.use(proxy('/api/', {
"target": "http://crm.local:4300",
ws: true,
pathRewrite: {
"^/api/": "/"
}
}));
app.use(proxy('/chat_api/', {
"target": "http://crm.local:4300",
ws: true,
pathRewrite: {
"^/chat_api/": "/"
}
}));
app.use(proxy('/images/', {
"target": "http://crm.local:4300",
pathRewrite: {
"^/images/resized/([^/]+)/uploads/(.+)": "/images/$1/$2"
}
}));
app.use(proxy('/assets', {
"target": "https://rngacoin.ru",
"headers": {
"host": "rngacoin.ru"
}
}));
};
// "/api/": {
// "target": "http://crm.local:4300",
// "ws": true,
// "pathRewrite": {
// "^/api/": "/"
// }
// },
// "/chat_api/": {
// "target": "http://crm.local:4300",
// "ws": true,
// "pathRewrite": {
// "^/chat_api/": "/"
// }
// },
// "/images/": {
// "target": "http://crm.local:4300",
// "pathRewrite": {
// "^/images/resized/([^/]+)/uploads/(.+)": "/images/$1/$2"
// }
// },
// "/assets": {
// "target": "https://rngacoin.ru",
// "secure": false,
// "headers": {
// "host": "rngacoin.ru"
// }
// }