-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' into astro-dot-session
- Loading branch information
Showing
5 changed files
with
58 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro': patch | ||
--- | ||
|
||
Fixes a regression where Astro was trying to access `Request.headers` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import type { MiddlewareHandler } from '../../types/public/common.js'; | ||
import { NOOP_MIDDLEWARE_HEADER } from '../constants.js'; | ||
|
||
export const NOOP_MIDDLEWARE_FN: MiddlewareHandler = (ctx, next) => { | ||
ctx.request.headers.set(NOOP_MIDDLEWARE_HEADER, 'true'); | ||
return next(); | ||
export const NOOP_MIDDLEWARE_FN: MiddlewareHandler = async (_ctx, next) => { | ||
const response = await next(); | ||
response.headers.set(NOOP_MIDDLEWARE_HEADER, 'true'); | ||
return response; | ||
}; |
Oops, something went wrong.