Log username a email pri kazdem dotazu pouze pro neproduction env
All checks were successful
ci/woodpecker/push/workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/workflow Pipeline was successful
This commit is contained in:
parent
9e247eb2a1
commit
cafcd0a467
@ -100,9 +100,11 @@ app.use("/api/", (req, res, next) => {
|
||||
const emailHeader = req.header('remote-email');
|
||||
if (userHeader !== undefined && nameHeader !== undefined) {
|
||||
const remoteName = Buffer.from(nameHeader, 'latin1').toString();
|
||||
if (ENVIRONMENT != "production"){
|
||||
console.log("Tvuj username, name a email: %s, %s, %s.", userHeader, remoteName, emailHeader);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!req.headers.authorization) {
|
||||
return res.status(401).json({ error: 'Nebyl předán autentizační token' });
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user