fix: SVG 净化循环内联到替换处,日志去换行改用标准写法,便于代码扫描识别

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
margrop
2026-10-22 16:57:13 +08:00
parent 3da1452eb1
commit b33101ff75
2 changed files with 21 additions and 24 deletions

View File

@@ -73,7 +73,7 @@ const httpsServer = https.createServer(options, (req, res) => {
// 代理错误处理
proxyReq.on('error', (err) => {
// 错误信息可能包含请求内容,去掉换行防止伪造日志行
console.error('[HTTPS] 代理错误:', String(err.message).replace(/[\r\n]+/g, ' '));
console.error('[HTTPS] 代理错误:', String(err.message).replace(/\n|\r/g, ''));
if (!res.headersSent) {
res.writeHead(502);
res.end('Bad Gateway');