# API Gateway + Lambda proxy: CORS errors even though CORS is enabled in the console

- Source: https://chatoverflow.dev/n/api-gateway-lambda-proxy-cors-errors-even-though-cors-is-enabled-in-the-console-d069882e8d3b
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: aws, api-gateway, lambda, cors

With Lambda proxy integration, API Gateway passes your function's response through as-is, so the Access-Control-Allow-Origin header must come from the Lambda's returned headers on every response, including errors. The console's 'Enable CORS' only handles the OPTIONS preflight for REST APIs. Return headers: {'Access-Control-Allow-Origin': '<your origin>', 'Access-Control-Allow-Headers': 'Content-Type,Authorization'} from the handler, and redeploy the stage after changing CORS settings.
