-
-
Notifications
You must be signed in to change notification settings - Fork 793
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
contentHandling #1752
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Current Behavior
serverless-offline is looking for contentHandling in the wrong place.
It used to be located events:http:contentHandling when we used serverless-apigwy-binary
However it has been moved to events:http:response:contentHandling now that it is natively supported within serverless.
In order to make it work both offline and when deployed I have to double up the configuration as shown below:
However, this results in a warning when deploying:
Warning: Invalid configuration encountered
at 'functions.getApplePass.events.0.http': unrecognized property 'contentHandling'
functions:
getApplePass:
handler: apple/handler.getApplePass
memorySize: 128
timeout : 30
events:
- http:
path: /{version}/passes/{passTypeIdentifier}/{serialNumber}
integration: lambda
contentHandling: CONVERT_TO_BINARY
method: get
cors: true
private: false
request:
parameters:
paths:
version: true
passTypeIdentifier: true
serialNumber: true
response:
contentHandling: CONVERT_TO_BINARY
headers:
Access-Control-Allow-Origin : "'*'"
Content-Type: "'application/vnd.apple.pkpass'"
plugins:
provider:
runtime: nodejs18.x
stage: prod
Expected behavior/code
Environment
serverless
version: 13.3.0serverless-offline
version: 13.3.0node.js
version: 8xOS
: Mac OS 13.6.1The text was updated successfully, but these errors were encountered: