From 88002ad0f7ec4c75984d58773a9293f6e0507166 Mon Sep 17 00:00:00 2001 From: Default User Date: Fri, 30 Jan 2026 16:44:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=9D=99=E6=80=81=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=B7=AF=E5=BE=84=E5=A4=84=E7=90=86=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9A=E7=A7=BB=E9=99=A4=E6=9F=A5=E8=AF=A2=E5=8F=82=E6=95=B0?= =?UTF-8?q?=EF=BC=8C=E7=A1=AE=E4=BF=9D=E5=B8=A6=E5=8F=82=E6=95=B0=E7=9A=84?= =?UTF-8?q?URL=E8=83=BD=E5=A4=9F=E6=AD=A3=E7=A1=AE=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E9=9D=99=E6=80=81=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index b512303..5e92d00 100644 --- a/server.js +++ b/server.js @@ -232,8 +232,8 @@ const server = http.createServer(async (req, res) => { } // 处理GET请求 - // 解析请求路径 - let filePath = '.' + req.url; + // 解析请求路径,移除查询参数 + let filePath = '.' + req.url.split('?')[0]; if (filePath === './') { filePath = './certificate.html'; }