feat: 添加短链管理功能,包括创建、更新、删除和列表接口

This commit is contained in:
2026-03-10 19:46:50 +08:00
parent 91eaad04d7
commit 48425c6120
25 changed files with 728 additions and 15 deletions

View File

@@ -150,6 +150,11 @@ export const handleRequest = async (req: http.IncomingMessage, res: http.ServerR
const isDev = isLocalhost(dns?.hostName);
if (isDev) {
console.debug('开发环境访问:', req.url, 'Host:', dns.hostName);
if (req.url === '/') {
res.writeHead(302, { Location: '/root/router-studio/' });
res.end();
return;
}
} else {
if (isIpv4OrIpv6(dns.hostName)) {
// 打印出 req.url 和错误信息