

There are two ways to confirm the cause of a CORS error from API Gateway: (For private REST APIs only) The incorrect invoke URL is called, or the traffic isn't being routed to the interface virtual private cloud (VPC) endpoint.

An API with proxy integration or non-proxy integration isn't configured to return the required CORS headers.

Preflight missing allow origin header how to#
The following example procedure shows how to troubleshoot the No ‘Access-Control-Allow-Origin’ header present CORS error. Note: CORS must be configured at the resource level and can be handled using API Gateway configurations or backend integrations, such as AWS Lambda. For HTTP APIs, see Configuring CORS for an HTTP API. To resolve a CORS error from an API Gateway REST API or HTTP API, you must reconfigure the API to meet the CORS standard.įor more information on configuring CORS for REST APIs, see Turning on CORS for a REST API resource. Cross-Origin Resource Sharing (CORS) errors occur when a server doesn’t return the HTTP headers required by the CORS standard.
