Show forwarded IP in whitelist denied message

This commit is contained in:
Stephen Brown
2025-02-25 16:33:00 +00:00
parent 12ef33bca4
commit 6947ca7433

View File

@ -75,7 +75,7 @@ export default function whitelistMiddleware() {
if (!noLogPaths.includes(req.path)) {
console.warn(
color.red(
`Blocked connection from ${clientIp}; User Agent: ${userAgent}\n\tTo allow this connection, add its IP address to the whitelist or disable whitelist mode by editing config.yaml in the root directory of your SillyTavern installation.\n`,
`Blocked connection from ${ipDetails}; User Agent: ${userAgent}\n\tTo allow this connection, add its IP address to the whitelist or disable whitelist mode by editing config.yaml in the root directory of your SillyTavern installation.\n`,
),
);
}