You don't need that CORS request
The irony in this is that with CloudFront at least, it can&#x27;t strip the &quot;&#x2F;api&quot; prefix before sending it to your backend, so you have to have your backend server understand &#x2F;api&#x2F;xyz rather than just &#x2F;xyz calls like when it was on a dedicated api subdomain.<p>But don&#x27;t worry! AWS thought of this! They invented Another Cloud Thing, namely Lambda@Edge, to solve this. Now you can run a JS function for every single request that hits your CloudFront Distribution so that you can run logic in there to strip the prefix before it gets passed to your origin. You read that right! Execute code every time a request hits your proxy! But wait, doesn&#x27;t executing code for every single request sound insane AND doesn&#x27;t it also add latency which this was trying to remove? Yes! Isn&#x27;t cloud just lovely?