1111
This commit is contained in:
parent
d0b5151228
commit
8b72802dd4
6
index.js
6
index.js
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user