File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ function getMiddlewareRequestHeaders(response: any) {
67
67
const headers : Record < string , string > = { } ;
68
68
( response . headers . get ( "x-middleware-override-headers" ) || "" )
69
69
. split ( "," )
70
+ . filter ( Boolean )
70
71
. forEach ( ( key : string ) => {
71
72
headers [ key ] = response . headers . get ( `x-middleware-request-${ key } ` )
72
73
} ) ;
Original file line number Diff line number Diff line change @@ -50,6 +50,11 @@ const server = slsHttp(
50
50
{
51
51
binary : true ,
52
52
provider : "aws" ,
53
+ request : ( request : any ) => {
54
+ // nextjs doesn't parse body if the property exists
55
+ // https://github.com/dougmoscrop/serverless-http/issues/227
56
+ delete request . body ;
57
+ } ,
53
58
} ,
54
59
) ;
55
60
@@ -100,4 +105,4 @@ function loadHtmlPages() {
100
105
return Object . entries ( JSON . parse ( json ) )
101
106
. filter ( ( [ _ , value ] ) => ( value as string ) . endsWith ( ".html" ) )
102
107
. map ( ( [ key ] ) => key ) ;
103
- }
108
+ }
You can’t perform that action at this time.
0 commit comments