mirror of
https://github.com/lush2020/edgetunnel.git
synced 2026-03-25 18:38:42 +08:00
fix: 修复UsageAPI配置逻辑,确保正确处理新配置并优化登出路径判断
This commit is contained in:
@@ -184,7 +184,7 @@ export default {
|
|||||||
|
|
||||||
ctx.waitUntil(请求日志记录(env, request, 访问IP, 'Admin_Login', config_JSON));
|
ctx.waitUntil(请求日志记录(env, request, 访问IP, 'Admin_Login', config_JSON));
|
||||||
return fetch(Pages静态页面 + '/admin');
|
return fetch(Pages静态页面 + '/admin');
|
||||||
} else if (访问路径 === 'logout') {//清除cookie并跳转到登录页面
|
} else if (访问路径 === 'logout' || uuidRegex.test(访问路径)) {//清除cookie并跳转到登录页面
|
||||||
const 响应 = new Response('重定向中...', { status: 302, headers: { 'Location': '/login' } });
|
const 响应 = new Response('重定向中...', { status: 302, headers: { 'Location': '/login' } });
|
||||||
响应.headers.set('Set-Cookie', 'auth=; Path=/; Max-Age=0; HttpOnly');
|
响应.headers.set('Set-Cookie', 'auth=; Path=/; Max-Age=0; HttpOnly');
|
||||||
return 响应;
|
return 响应;
|
||||||
|
|||||||
Reference in New Issue
Block a user