Error when using some filters "The request to your server either failed"

When using filters, especially date filters, forest is unable to retrieve data from my server. The errors I am getting back look as though they are CORS related but I am able to access my data normally but this only happens on filters.

Hello @ed.sparks,

I’m sorry to hear that you have issues when using filters, on my side I haven’t been able to reproduce this behaviour, can you give me more information such as your project name, the environments impacted by this issue as well as your agent type and version.

Best regards,

Dogan

Project is ‘Ibex’ and it’s the production environment
Agent type: Not sure what this is but at a guess it’s Rails and forest_liana 7.7.3

Hello @ed.sparks,

Can you please send me your configuration concerning CORS in your rails application. Does it match what we have in our documentation ? The error shown in the exemple seems similar.

Best regards,

Dogan

Slightly different but works for all of our current ‘ALLOWED_REQUST_ORIGINS’.

I saw someone posted this as a similar CORS fix. Is this what I need?

if you do configure it the same way it might fix your issue, it is a bit hard for me to tell without having access to your “ALLOWED_REQUEST_ORIGINS”, and the preflight request.

Can you, the same way the OP from the post you linked, share the the request/response headers for the preflight request as well as the headers of the request ?

Do you confirm that ‘https://app.forestadmin.com’ is present in your “ALLOWED_REQUEST_ORIGINS” ?

Both “https://app.forestadmin.com” and “app.forestadmin.com” are present. The latter added recently to no improvement


Can you please share the headers for the request/response of the preflight request, it is done before the request you shared, with the same url. The method used for a preflight request is “OPTIONS”.

image



Hey @ed.sparks :wave:

Are you using cloudflare WAF?

From the response I can see, it seems like the request does not reach the agent, as you have a report-to header pointing to cloudflare.

We already encounter in the past issue with cloudflare flagging specific request as abuse, so that would be my guess here.

Let me know if that helps

Superstar!!!
That was it. Cloudflare appears to be blocking part only some of the requests. New rule added and seems to be working great.
Thank you very much!

1 Like