Stop wasting money on CORS preflight requests.
Here's a quick tip for reducing API Gateway costs. 👇
Here's a quick tip for reducing API Gateway costs. 👇
Comments
Since API Gateway charges per request, you’re billed for both the preflight and the main request.
Even if your API is hosted on a subdomain, e.g. https://api.example.com, the browser still sees it as a cross-origin request from https://example.com.
Moving the API to https://example.com/api will eliminate the need for preflight requests altogether.
Subscribe to my free newsletter and level up your AWS game: https://theburningmonk.com/subscribe