mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-29 06:34:10 +00:00
dependabot part 1
This commit is contained in:
@@ -303,51 +303,53 @@ module.exports = function (_env = {}, argv = {}) {
|
||||
}
|
||||
});
|
||||
|
||||
// Only handle OPTIONS for /api (preflight)
|
||||
if (server?.app) {
|
||||
server.app.options("/api", (_req, res) => res.sendStatus(200));
|
||||
server.app.options("/api/*", (_req, res) => res.sendStatus(200));
|
||||
}
|
||||
|
||||
return middlewares;
|
||||
},
|
||||
proxy: {
|
||||
"/api": {
|
||||
proxy: [
|
||||
{
|
||||
context: ["/api"],
|
||||
target: "https://cdb-ms-mpac-pbe.cosmos.azure.com",
|
||||
changeOrigin: true,
|
||||
logLevel: "debug",
|
||||
bypass: (req, res) => {
|
||||
if (req.method === "OPTIONS") {
|
||||
res.statusCode = 200;
|
||||
res.send();
|
||||
}
|
||||
},
|
||||
},
|
||||
"/proxy": {
|
||||
{
|
||||
context: ["/proxy"],
|
||||
target: "https://cdb-ms-mpac-pbe.cosmos.azure.com",
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
logLevel: "debug",
|
||||
pathRewrite: { "^/proxy": "" },
|
||||
router: (req) => {
|
||||
let newTarget = req.headers["x-ms-proxy-target"];
|
||||
return newTarget;
|
||||
},
|
||||
router: (req) => req.headers["x-ms-proxy-target"],
|
||||
},
|
||||
"/_explorer": {
|
||||
{
|
||||
context: ["/_explorer"],
|
||||
target: process.env.EMULATOR_ENDPOINT || "https://localhost:8081/",
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
logLevel: "debug",
|
||||
},
|
||||
"/explorerProxy": {
|
||||
{
|
||||
context: ["/explorerProxy"],
|
||||
target: process.env.EMULATOR_ENDPOINT || "https://localhost:8081/",
|
||||
pathRewrite: { "^/explorerProxy": "" },
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
logLevel: "debug",
|
||||
},
|
||||
[`/${AZURE_TENANT_ID}`]: {
|
||||
{
|
||||
context: [`/${AZURE_TENANT_ID}`],
|
||||
target: "https://login.microsoftonline.com/",
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
logLevel: "debug",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
stats: "minimal",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user