update
This commit is contained in:
@ -3,7 +3,8 @@ import { websiteConfig } from "../../utils/rpc";
|
||||
|
||||
export async function onRequest (context: any, next: any) {
|
||||
|
||||
// 拦截一个请求里的数据
|
||||
console.log('middleware')
|
||||
// 拦截一个请求里的数据
|
||||
// 可选地修改 `locals` 中的属性
|
||||
const host = await getHost(context.request);
|
||||
|
||||
@ -12,7 +13,6 @@ export async function onRequest (context: any, next: any) {
|
||||
return next();
|
||||
}
|
||||
|
||||
|
||||
// 防止无线跳转
|
||||
if (context.locals.is_write) {
|
||||
return next();
|
||||
|
Reference in New Issue
Block a user