chore(security): fixes

This commit is contained in:
alam00000
2026-04-18 15:21:59 +05:30
parent 121de29d80
commit b040aef729
11 changed files with 59 additions and 33 deletions

View File

@@ -328,9 +328,10 @@ function createCorsProxyMiddleware(): Connect.NextHandleFunction {
);
proxyReq.on('error', (err) => {
console.error('[CORS Proxy] Error:', err.message);
const msg = String(err.message).replace(/[\r\n]+/g, ' ');
console.error('[CORS Proxy] Error:', msg);
res.statusCode = 502;
res.end(`Proxy error: ${err.message}`);
res.end(`Proxy error: ${msg}`);
});
if (body.length > 0) {