This commit is contained in:
蒋小陌 2024-10-13 15:23:45 +08:00
parent d0b5151228
commit 8b72802dd4

View File

@ -41,6 +41,10 @@ setInterval(() => {
// 处理请求并返回数据
const server = http.createServer(async (req, res) => {
req.url = req.url.replace(/\/{2,}/g, '/');
if (req.url === '/favicon.ico') {
res.writeHead(204);
res.end();
@ -68,7 +72,7 @@ const server = http.createServer(async (req, res) => {
if (!sign || reqPath === '/') {
res.writeHead(400, { 'Content-Type': 'text/plain' });
res.end('Bad Request: Missing sign or path');
res.end('Bad Request: Missing sign or path (' + req.url + ')');
return;
}