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'; }