mirror of
https://github.com/lush2020/edgetunnel.git
synced 2026-03-24 00:48:39 +08:00
@@ -42,13 +42,18 @@ function authentication(context: EventContext<any, any, any>) {
|
||||
},
|
||||
});
|
||||
} else {
|
||||
return new Response(``, {
|
||||
status: 302,
|
||||
headers: {
|
||||
'content-type': 'text/html; charset=utf-8',
|
||||
Location: `./${userID}`,
|
||||
},
|
||||
});
|
||||
const url = new URL(context.request.url);
|
||||
if (url.pathname === '/') {
|
||||
return new Response(``, {
|
||||
status: 302,
|
||||
headers: {
|
||||
'content-type': 'text/html; charset=utf-8',
|
||||
Location: `./${userID}`,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
return context.next();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user