-
Notifications
You must be signed in to change notification settings - Fork 551
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
skip header rules on asset handler error (#5750)
* skip header rules on asset handler error * Update packages/pages-shared/asset-server/handler.ts Co-authored-by: Daniel Walsh <walshydev@gmail.com> * Update packages/pages-shared/asset-server/handler.ts Co-authored-by: Daniel Walsh <walshydev@gmail.com> * update test to include 404, 301 * Only prevent attaching headers for 5XX errors --------- Co-authored-by: Daniel Walsh <walshydev@gmail.com> Co-authored-by: Greg Brimble <gbrimble@cloudflare.com>
- Loading branch information
1 parent
f520a71
commit f514934
Showing
3 changed files
with
87 additions
and
1 deletion.
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,8 @@ | ||
--- | ||
"@cloudflare/pages-shared": patch | ||
--- | ||
|
||
fix: omit headers rules on internal error | ||
|
||
The Pages asset handler will no longer apply headers rules on 5XX responses caused by some internal error. | ||
This prevents transient errors from being cached when caching headers are being set by headers rules. |
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