1// Managed-mode middleware (`src/middleware/*.ts`): waku's managed server
2// entry collects these via `import.meta.glob` and hands them to the adapter,
3// which runs them (via `middlewareRunner`) ahead of the RSC middleware for
4// every worker-handled request. Sets a response header the smoke test
5// asserts in both live and dev modes.
6import type { Context } from "hono";
7
8export default function headersMiddleware(_opts: unknown) {
9 return async (c: Context, next: () => Promise<void>) => {
10 await next();
11 c.res.headers.set("x-waku-middleware", "fixtures-waku");
12 };
13}