Log username a email pri kazdem dotazu pouze pro neproduction env
All checks were successful
ci/woodpecker/push/workflow Pipeline was successful

This commit is contained in:
batmanisko 2025-02-17 09:19:28 +01:00
parent 9e247eb2a1
commit cafcd0a467

View File

@ -100,7 +100,9 @@ app.use("/api/", (req, res, next) => {
const emailHeader = req.header('remote-email'); const emailHeader = req.header('remote-email');
if (userHeader !== undefined && nameHeader !== undefined) { if (userHeader !== undefined && nameHeader !== undefined) {
const remoteName = Buffer.from(nameHeader, 'latin1').toString(); const remoteName = Buffer.from(nameHeader, 'latin1').toString();
console.log("Tvuj username, name a email: %s, %s, %s.", userHeader, remoteName, emailHeader); if (ENVIRONMENT != "production"){
console.log("Tvuj username, name a email: %s, %s, %s.", userHeader, remoteName, emailHeader);
}
} }
} }
if (!req.headers.authorization) { if (!req.headers.authorization) {