Aws Api Gateway Cors Issue - Js
Solution 1:
This post should help you enable CORS on your API gateway
https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-cors.html
Sign in to the API Gateway console at https://console.aws.amazon.com/apigateway.
In the API Gateway console, choose an API under APIs.
Choose a resource under Resources. This will enable CORS for all the methods on the resource. Alternatively, you could choose a method under the resource to enable CORS for just this method.
Choose Enable CORS from the Actions drop-down menu.
- Choose Enable CORS
In the Enable CORS form, do the following:
In the
Access-Control-Allow-Headers
input field, type a static string of a comma-separated list of headers that the client must submit in the actual request of the resource. Use the console-provided header list ofContent-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token
or specify your own headers.Use the console-provided value of '*' as the Access-Control-Allow-Origin header value to allow access requests from all domains, or specify a named domain to all access requests from the specified domain.
Choose Enable CORS and replace existing CORS headers.
In Confirm method changes, choose Yes, overwrite existing values to confirm the new CORS settings.
Post a Comment for "Aws Api Gateway Cors Issue - Js"