You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/open-next/src/converters/aws-apigw-v2.ts
+31-1Lines changed: 31 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,31 @@ import { debug } from "../adapters/logger";
6
6
import{convertToQuery}from"../core/routing/util";
7
7
import{removeUndefinedFromQuery}from"./utils";
8
8
9
+
// Not sure which one is reallly needed as this is not documented anywhere but server actions redirect are not working without this, it causes a 500 error from cloudfront itself with a 'x-amzErrortype: InternalFailure' header
10
+
constCloudFrontBlacklistedHeaders=[
11
+
"connection",
12
+
"expect",
13
+
"keep-alive",
14
+
"proxy-authenticate",
15
+
"proxy-authorization",
16
+
"proxy-connection",
17
+
"trailer",
18
+
"upgrade",
19
+
"x-accel-buffering",
20
+
"x-accel-charset",
21
+
"x-accel-limit-rate",
22
+
"x-accel-redirect",
23
+
/x-amz-cf-(.*)/,
24
+
/x-amzn-(.*)/,
25
+
/x-edge-(.*)/,
26
+
"x-cache",
27
+
"x-forwarded-proto",
28
+
"x-real-ip",
29
+
"set-cookie",
30
+
"age",
31
+
"via",
32
+
];
33
+
9
34
functionnormalizeAPIGatewayProxyEventV2Body(
10
35
event: APIGatewayProxyEventV2,
11
36
): Buffer{
@@ -65,7 +90,12 @@ function convertToApiGatewayProxyResultV2(
0 commit comments