- Strapi Version:
- Operating System:
- Node Version:
- NPM Version:
- Yarn Version:
When I use an filter operator in the query it fails and throws a cors error:
Access to XMLHttpRequest at 'http://myapi.com/api/...' from origin 'http://myapp.com' 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.
I’m not sure it’s really a cors problem, but a bug that causes it.
works perfectly but
produces the error
Any operator triggers the error ($eq, $or, $and, $lt, …) like
https://myapi.com/api/table?filters[date][$lte]=2022-03-01&filters[date][$gte]=2022-04-01 https://myapi.com/api/table?filters[$or][date][$eq]=2022-03-01&[$or]filters[date][$eq]=2022-04-01 ...
This only happens on the server, in localhost all queries work fine.
Anyone else has happened? Does anyone know what the problem is? Any idea how to fix it?