Skip to content

Commit

Permalink
add output
Browse files Browse the repository at this point in the history
  • Loading branch information
mpabst-udg committed Feb 21, 2024
1 parent f99384c commit 0edff92
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ app.get("/inc", (req, res, next) => {

app.get("/cookie-echo", (req, res, next) => {
var value = req.cookies["cookie-in"];
//was-tst-apim.azure-api.net/fast-donkey
var out = "";
for (const [key, value] of Object.entries(req.cookies)) {
console.log(`${key}: ${value}`);
out += `${key}: ${value}\n`;
}

res
.cookie("cookie-out", value, { maxAge: 10 })
.send("out cookie set to" + value);
.send("out cookie set to " + value + "\n" + out);
});

0 comments on commit 0edff92

Please sign in to comment.