跳转到内容

The middleware returned something that is not a Response object.

MiddlewareNotAResponse: 中间件返回的数据必须是一个合法的 Response 对象。

在开发模式下,当中间件返回的数据不是一个 Response 对象时抛出错误。

例如:

import { defineMiddleware } from "astro:middleware";
export const onRequest = defineMiddleware(() => {
return "string"
});
Contribute

你有什么想法?

Community