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: APIGW v2 Request Cookie Header #153

Merged

Conversation

araki-yzrh
Copy link
Contributor

@araki-yzrh araki-yzrh commented Dec 25, 2020

Fixed an issue.
API Gateway v2 event "cookies" was not included in "scope.headers"

see also: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html

v1 event

was worked.

event == {
  "version": "1.0",
  "headers": {
    "accept-encoding": "gzip, deflate",
    "cookie": "cookie1; cookie2"
  },
  ...
scope == {
  ...
  "headers": [
    [b"accept-encoding", b"gzip, deflate"],
    [b"cookie", b"cookie1; cookie2"],
  ...

v2 event

was not worked.

event == {
  "version": "2.0",
  "cookies": [
    "cookie1",
    "cookie2"
  ],
  "headers": {
    "accept-encoding": "gzip, deflate"
  },
  ...
scope == {
  ...
  "headers": [
    [b"accept-encoding", b"gzip, deflate"],
  ...

@jordaneremieff jordaneremieff merged commit 8763b97 into Kludex:main Dec 25, 2020
@jordaneremieff
Copy link
Collaborator

Great work! Thank you.

four43 pushed a commit to four43/mangum that referenced this pull request Mar 27, 2021
* fix apigw v2 request cookie header

* add v1 cookie header test
four43 pushed a commit to four43/mangum that referenced this pull request Aug 20, 2021
* fix apigw v2 request cookie header

* add v1 cookie header test
khamaileon pushed a commit to khamaileon/mangum that referenced this pull request Jan 13, 2024
* fix apigw v2 request cookie header

* add v1 cookie header test
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