feat: 优化路径匹配逻辑 & 打印入口路由
All checks were successful
CI Monitor MIflow / build-image (push) Successful in 45s
All checks were successful
CI Monitor MIflow / build-image (push) Successful in 45s
This commit is contained in:
parent
8d6e8a2844
commit
5903c7ee94
4
index.ts
4
index.ts
@ -12,10 +12,10 @@ const PREFIX = "/gitlab_monitor"
|
||||
const server = Bun.serve({
|
||||
async fetch(req) {
|
||||
try {
|
||||
// 打印当前路由
|
||||
console.log("🚀 ~ serve ~ req.url", req.url)
|
||||
// 路由处理
|
||||
const { exactCheck } = makeCheckPathTool(req.url, PREFIX)
|
||||
// 非根路径
|
||||
if (!exactCheck("/")) console.log("🚀 ~ serve ~ req.url", req.url)
|
||||
// CI 监控
|
||||
if (exactCheck("/ci")) return manageCIMonitorReq(req)
|
||||
// Gitlab 事件
|
||||
|
Loading…
x
Reference in New Issue
Block a user