forked from svrjs/svrjs
Use template strings for user agent information log messages
This commit is contained in:
parent
fc14cfcc1b
commit
f247e7a035
3 changed files with 3 additions and 3 deletions
|
@ -49,7 +49,7 @@ function noproxyHandler(req, socket, head) {
|
|||
} wants to proxy ${req.url} through this server`,
|
||||
);
|
||||
if (req.headers["user-agent"] != undefined)
|
||||
logFacilities.reqmessage("Client uses " + req.headers["user-agent"]);
|
||||
logFacilities.reqmessage(`Client uses ${req.headers["user-agent"]}`);
|
||||
|
||||
logFacilities.errmessage("This server will never be a proxy.");
|
||||
if (!socket.destroyed) socket.end("HTTP/1.1 501 Not Implemented\n\n");
|
||||
|
|
|
@ -54,7 +54,7 @@ function proxyHandler(req, socket, head) {
|
|||
} wants to proxy ${req.url} through this server`,
|
||||
);
|
||||
if (req.headers["user-agent"] != undefined)
|
||||
logFacilities.reqmessage("Client uses " + req.headers["user-agent"]);
|
||||
logFacilities.reqmessage(`Client uses ${req.headers["user-agent"]}`);
|
||||
|
||||
let index = 0;
|
||||
|
||||
|
|
|
@ -287,7 +287,7 @@ function requestHandler(req, res) {
|
|||
}${req.headers.host == undefined || req.isProxy ? "" : req.headers.host}${req.url}`,
|
||||
);
|
||||
if (req.headers["user-agent"] != undefined)
|
||||
logFacilities.reqmessage("Client uses " + req.headers["user-agent"]);
|
||||
logFacilities.reqmessage(`Client uses ${req.headers["user-agent"]}`);
|
||||
if (oldHostHeader && oldHostHeader != req.headers.host)
|
||||
logFacilities.resmessage(
|
||||
"Host name rewritten: " + oldHostHeader + " => " + req.headers.host,
|
||||
|
|
Reference in a new issue