我已经看到你可以从 Astro 中的请求中获取 http 标头信息,如下所示
Astro.request.headers.get('cookie')
如果您使用默认的
static
Astro.request
所以你的实现方式只能适用于动态渲染。