From 0edff9210265eaee326802cc198d86b132e7bbd2 Mon Sep 17 00:00:00 2001 From: Marcello Pabst Date: Wed, 21 Feb 2024 15:15:49 +0100 Subject: [PATCH] add output --- index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index c43be0d..7b74279 100644 --- a/index.js +++ b/index.js @@ -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); });