添加请求日志,便于排查

This commit is contained in:
h4erj
2026-06-24 12:53:04 +08:00
parent f8f4b5bbb8
commit 42f491e889
+1
View File
@@ -168,6 +168,7 @@ async function handleContact(req, res) {
}
const server = http.createServer((req, res) => {
console.log(`${new Date().toISOString()} ${req.method} ${req.url}`);
if (req.method === 'OPTIONS') {
res.writeHead(204, {
'Access-Control-Allow-Origin': CORS_ORIGIN,