Rate Limit and CORS Issue

Hi,

We've set up a rate limit using Cloudflare rules, and it's working fine. However, when we hit the rate limit, I get a CORS error.

My API server and client are on different domains. I tried to solve this by adding Response Header Transform Rules, but while this has changed the error, it hasn't solved the problem.

With Response Header Transform Rules, the error is:
Access to XMLHttpRequest at 'https://api-sandbox.meetsummer.org/login' from origin 'https://app-sandbox.meetsummer.org' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

Without Response Header Transform Rules, the error is:
Access to XMLHttpRequest at 'https://api-sandbox.meetsummer.org/login' from origin 'https://app-sandbox.meetsummer.org' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Can someone guide me on how to resolve this issue?
Was this page helpful?