Closed apokryfos closed 3 months ago
Add the headers passed via the event callback to the response to match the behaviour of the Application Load Balancer event.
The headers of the ALB event response are not currently passed via the serverless offline alb http server.
Fixes issues with code like below:
callback(null, { statusCode: 302, headers: { Location: url } });
previously the above code with generate a redirect response without the Location header included which did not result in any redirection happening.
I've testeded locally in the application that first presented this issue and it seems to work. Did not do any other testing myself.
I think this resolves #1728
Turns out https://github.com/dherault/serverless-offline/pull/1756 also solves this issue and includes tests so I think that would be a better PR to merge for this
Add the headers passed via the event callback to the response to match the behaviour of the Application Load Balancer event.
Description
The headers of the ALB event response are not currently passed via the serverless offline alb http server.
Motivation and Context
Fixes issues with code like below:
previously the above code with generate a redirect response without the Location header included which did not result in any redirection happening.
How Has This Been Tested?
I've testeded locally in the application that first presented this issue and it seems to work. Did not do any other testing myself.