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

fix: make headers an object instead of an array #386

Merged
merged 2 commits into from
May 31, 2021

Conversation

hffmnn
Copy link
Contributor

@hffmnn hffmnn commented Mar 11, 2021

Description of changes:

Currently, the generated headers look like this:

[
'accept-encoding': 'gzip, deflate',
'content-length': 104,
'content-type': 'application/json',
'x-forwarded-port': '443',
'x-forwarded-proto': 'https'
]

The headers in src/event-sources/aws/api-gateway-v2.js are of type array but should be of type object.

TIL: something like headers['x-forwarded-proto'] still returns https. But: JSON.stringify(headers) returns an empty array.

Checklist

  • Tests have been added and are passing -> added one, but not sure about the structure
  • Documentation has been updated -> Not sure if this needs documentation?

If you think that tests and docs should be added, please let me know.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Collaborator

@brettstack brettstack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this! Sorry for the delay.

@brettstack brettstack merged commit a987fee into CodeGenieApp:mainline May 31, 2021
github-actions bot pushed a commit that referenced this pull request May 31, 2021
## [4.3.8](v4.3.7...v4.3.8) (2021-05-31)

### Bug Fixes

* make headers an object instead of an array ([#386](#386)) ([a987fee](a987fee))
@github-actions
Copy link

🎉 This PR is included in version 4.3.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

OneDev0411 added a commit to OneDev0411/serverless-express that referenced this pull request Mar 16, 2023
## [4.3.8](CodeGenieApp/serverless-express@v4.3.7...v4.3.8) (2021-05-31)

### Bug Fixes

* make headers an object instead of an array ([#386](CodeGenieApp/serverless-express#386)) ([a987fee](CodeGenieApp/serverless-express@a987fee))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants