Apparent CORS error hiding other error we can't find, looking for ideas

70 Views Asked by At

We are having trouble debugging an issue that looks like a CORS issue but it's finally not. Our app randomly meets errors where requests do not complete. When we retry the same request, it works fine.

At some point we configured CORS with a wildcard, and we still got the same problem.

The problem is not reproductible locally and happens randomly in production.

We have 401 logs on datadog, but no logs on our heroku servers.

It seems like if the error happens more frequently when we just launch the app.

Our server uses php symfony5 with nelmio cors bundle

nelmio_cors:
    defaults:
        origin_regex: true
        allow_origin: ['^.*\.site.com', '^https?://localhost(:[0-9]+)?$']
        allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
        allow_headers: ['Content-Type', 'Authorization', 'language', 'include']
        max_age: 3600
    paths:
        '^/': null

At this point we are looking for ideas of things we could investigate because we don't know where to look.

Any help appreciated, thanks :)

example error

example error 2

0

There are 0 best solutions below