Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the headers passed via the event callback to the response #1736

Closed
wants to merge 4 commits into from

Conversation

apokryfos
Copy link

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:


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.

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.

Add the headers passed via the event callback to the response to match the behaviour of the Application Load Balancer event.
@apokryfos
Copy link
Author

I think this resolves #1728

@apokryfos
Copy link
Author

Turns out #1756 also solves this issue and includes tests so I think that would be a better PR to merge for this

@apokryfos apokryfos closed this Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants