diff --git a/server/src/index.ts b/server/src/index.ts index f8dfcb0..3df3678 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -55,6 +55,7 @@ app.get("/api/whoami", (req, res) => { res.status(403).json({ error: 'Není zapnuté přihlášení z hlaviček' }); } if(process.env.ENABLE_HEADERS_LOGGING === 'yes'){ + delete req.headers["cookie"] console.log(req.headers) } res.send(req.header(HTTP_REMOTE_USER_HEADER_NAME)); @@ -100,8 +101,8 @@ app.use("/api/", (req, res, next) => { if (HTTP_REMOTE_USER_ENABLED) { // Autentizace pomocí trusted headers const remoteUser = req.header(HTTP_REMOTE_USER_HEADER_NAME); - delete req.headers["cookie"] if(process.env.ENABLE_HEADERS_LOGGING === 'yes'){ + delete req.headers["cookie"] console.log(req.headers) } if (remoteUser && remoteUser.length > 0) {