add dev only things
This commit is contained in:
committed by
Daniel Hutzel
parent
fdd2a7a2c5
commit
29fb47f2e9
@@ -2,7 +2,7 @@ const cds = require("@sap/cds");
|
||||
|
||||
// handle bootstrapping events...
|
||||
cds.on("bootstrap", (app) => {
|
||||
// dev only
|
||||
if (cds.env.env === "development") {
|
||||
app.use((req, res, next) => {
|
||||
res.header("Access-Control-Allow-Origin", "*");
|
||||
res.header(
|
||||
@@ -23,7 +23,7 @@ cds.on("bootstrap", (app) => {
|
||||
next();
|
||||
}
|
||||
});
|
||||
// add your own middleware before any by cds are added
|
||||
}
|
||||
});
|
||||
cds.on("served", async ({ db, messaging, ...servedServices }) => {
|
||||
// add logging current user before any request
|
||||
|
||||
Reference in New Issue
Block a user