Skip to content

Commit

Permalink
Fix for external middleware (#412)
Browse files Browse the repository at this point in the history
* do not remove read only headers

* Create warm-waves-allow.md
  • Loading branch information
conico974 authored May 12, 2024
1 parent d5efc43 commit 3b004dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/warm-waves-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"open-next": patch
---

Fix for external middleware
10 changes: 0 additions & 10 deletions packages/open-next/src/converters/aws-cloudfront.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,6 @@ const CloudFrontBlacklistedHeaders = [
"x-cache",
"x-forwarded-proto",
"x-real-ip",

// Read-only headers, see: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/edge-function-restrictions-all.html#function-restrictions-read-only-headers
"accept-encoding",
"content-length",
"if-modified-since",
"if-none-match",
"if-range",
"if-unmodified-since",
"transfer-encoding",
"via",
];

function normalizeCloudFrontRequestEventHeaders(
Expand Down

0 comments on commit 3b004dd

Please sign in to comment.