Add 'Access-Control-Allow-Origin' header to Authorizer's error responses
anton-107 opened this issue · comments
Anton Nekipelov commented
When using Cognito Authorizer, I'm hitting an endpoint being Unauthorized, browser throws the following error:
"No 'Access-Control-Allow-Origin' header is present on the requested resource"
This can be solved in API Gateway Console by setting a 'Access-Control-Allow-Origin' header in 'Gateway responses' > 'Unauthorized' > 'Response header'
Would be great if this header can be set by ClaudiaJS automatically (probably it's a good idea to set it on other responses as well).
Gojko Adzic commented
this is implemented, you can set custom responses from claudia-api-builder 3.0.0 onwards.
Gojko Adzic commented
this is now on NPM, as version v3.0.0