Updated proxy for development
This commit is contained in:
parent
9bed3908d3
commit
3b75eff883
1 changed files with 4 additions and 19 deletions
|
@ -1,23 +1,8 @@
|
||||||
const { createProxyMiddleware } = require("http-proxy-middleware");
|
const { createProxyMiddleware } = require("http-proxy-middleware");
|
||||||
const cairoUrl =
|
const cairoUrl = process.env.CAIRO_URL || "http://cairo.dunestorm.net:52000";
|
||||||
process.env.CAIRO_URL || "http://cairo.dunestorm.net:52000";
|
const nubianUrl = process.env.NUBIAN_URL || "http://nubian.dunestorm.net:52001";
|
||||||
const nubianUrl =
|
|
||||||
process.env.NUBIAN_URL || "http://nubian.dunestorm.net:52001";
|
|
||||||
module.exports = (app) => {
|
module.exports = (app) => {
|
||||||
// Cairo Proxy
|
// Cairo Proxy
|
||||||
app.use(
|
app.use("/api/cairo", createProxyMiddleware({ target: cairoUrl }));
|
||||||
"/api/cairo",
|
app.use("/api/nubian", createProxyMiddleware({ target: nubianUrl }));
|
||||||
createProxyMiddleware({
|
|
||||||
target: cairoUrl,
|
|
||||||
// logLevel: "silent",
|
|
||||||
})
|
|
||||||
);
|
|
||||||
// Nubian Proxy
|
|
||||||
app.use(
|
|
||||||
"/api/nubian",
|
|
||||||
createProxyMiddleware({
|
|
||||||
target: nubianUrl,
|
|
||||||
// logLevel: "silent",
|
|
||||||
})
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
Reference in a new issue