angular - "Enable CORS" in AWS API Gateway resource? -


i have problem aws api gateway. i'm developing web application angular 4 (using typescript language), if invoke put method frontend, following error message appears:

method put not allowed access-control-allow-methods in preflight response. 

and it's strange because in aws console put method works (i did many tests directly api gateway console stage after deploy, , works well). if go "actions/enable cors" methods have check, included put method, , don't explain problem api gateway.

why error if seems ok in api gateway? there way change these cors?

please follow below steps,

  1. create new options method under /services resource
  2. create , populate access-control-allow-origin/method/headers in options method.

enable cors below after create options

enter image description here

source :- https://forums.aws.amazon.com/thread.jspa?messageid=644489


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -