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

Internal Server Error when setting cache key parameter request.header.Authorization #110

Closed
eggboy0 opened this issue May 14, 2022 · 2 comments

Comments

@eggboy0
Copy link

eggboy0 commented May 14, 2022

I have the following in serverless.yml:

GET method that uses Lambda Proxy Integration:

        caching:
            enabled: true
            cacheKeyParameters:
              - name: request.header.Authorization
GET /api-path
Headers:
  Authorization: Bearer <token>

However, this always yields no results due to Internal Server Error when there should be results.
By removing the caching for the method, it works fine.

I am using a custom Token-based lambda authorizer. The token source is "Authorization". Not sure if that makes a difference?

Here's the error I see from X-Ray trace:

Error 403: Execution failed due to configuration error: The request signature we calculated does not match the signature you provided.

Any ideas?

@eggboy0 eggboy0 changed the title Caching yields no results when adding cache key parameter method.request.Authorization Internal Server Error when setting cache key parameter request.header.Authorization May 14, 2022
@DianaIonita
Copy link
Owner

Hi @eggboy0,

Thanks for reporting the issue. Please use the previous version 1.7.5 for now while I work on a fix. I will let you know when sorted.

@DianaIonita
Copy link
Owner

Hi @eggboy0,

I just released v1.8.1 which should fix your problem. Please reopen the issue if that's not the case.

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

No branches or pull requests

2 participants