Open aditya81070 opened 3 years ago
Hey team, I have reopened the issue because in the past the following configuration worked for me but after recent update, I am getting the same error:
functions:
auth:
handler: handlers/auth.auth
vpc: ${self:custom.vpc}
lambda-trigger:
handler: handlers/lambda-trigger.lambdaTrigger
timeout: 10
events:
- http:
method: post
path: /lambda-trigger
cors: true
authorizer:
name: auth
type: REQUEST
identitySource: context.identity.sourceIp
resultTtlInSeconds: 0
Hey @dherault is this repository actively maintained or do we have some contributors guidelines that I am not following? There has been a long time since this is not answered.
Hello all, I am writing a lambda authoriser and want to use
context.identity.sourceIp, method.request.headers.Authorization
asidentitySource
. When I deploy the application to AWS, the authorizer is set up correctly and things are working fine.But when I run my code locally, I get the error
Serverless Offline only supports retrieving tokens from the headers (λ: auth)
. If I remove thecontext.identity.sourceIp
fromidentitySource
then it will work fine. If AWS is accepting the values it means these values are correct.Do I need to do some extra things to make it work?
Here is the complete code.