Skip to content

Commit

Permalink
Await response header for middleware and layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertSabate committed Jan 30, 2025
1 parent 9ef8425 commit 017a6e4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ export default async function getPageComponentWithHeaders({
}: Params) {
const { Page, module, layoutModule } = await processPageRoute(route, error);
const middlewareResponseHeaders =
middlewareModule?.responseHeaders?.(req, status) ?? {};
(await middlewareModule?.responseHeaders?.(req, status)) ?? {};

const layoutResponseHeaders =
layoutModule?.responseHeaders?.(req, status) ?? {};
(await layoutModule?.responseHeaders?.(req, status)) ?? {};

const pageResponseHeaders =
(await module.responseHeaders?.(req, status)) ?? {};
Expand Down

0 comments on commit 017a6e4

Please sign in to comment.