更新 package.json 版本号至 0.0.12;优化 isLocalhost 函数以处理空主机名;修复 handleRequest 中对 dns.hostName 的访问;在轻代码列表中添加 code 字段;更新示例路由描述
This commit is contained in:
@@ -145,7 +145,7 @@ export const handleRequest = async (req: http.IncomingMessage, res: http.ServerR
|
||||
|
||||
let user, app;
|
||||
let domainApp = false;
|
||||
const isDev = isLocalhost(dns.hostName);
|
||||
const isDev = isLocalhost(dns?.hostName);
|
||||
if (isDev) {
|
||||
console.debug('开发环境访问:', req.url, 'Host:', dns.hostName);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user