For whatever reason, no matter what I do, I can’t get a preflight request to allow the PATCH verb. This configuration snippet is what I’ve configured for my API endpoint, but the actual preflight is just allowing OPTIONS, GET, POST. What am I doing wrong?
FYI, my application works just fine for other requests (which are all GET or POST).
patchfiles:
handler: services/files.patchFiles
memorySize: 128
timeout: 10
events:
- http:
path: files/{id}
method: patch
authorizer:
arn: arn:aws:**************
cors:
origin: ‘*’
headers:
- Content-Type
- X-Amz-Date
- Authorization
- X-Api-Key
- X-Amz-Security-Token
- X-Amz-User-Agent
allowCredentials: false
cacheControl: ‘max-age=600, s-maxage=600, proxy-revalidate’
methods: ‘DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT’
The endpoint works in Postman as well (I know this is a CORS problem, just saying…)