Closed trompette closed 6 years ago
Why not I guess, but I'd say you could also do this in a request listener to ignore all OPTIONS requests if you are not interested in tracking these. That said if 30% of traffic is OPTIONS requests maybe you should check why that is.. Maybe it can be reduced?
You could also do this in a request listener to ignore all OPTIONS requests.
That is exactly what we did, but we thought it would be nice to be part of NelmioCorsBundle
.
An alternative to the configuration option could be a README addition. I can help by openning a PR.
If 30% of traffic is OPTIONS requests maybe you should check why that is.
Our API is mostly authenticated routes, that is why.
Actually we were surprised that it was only 30%.
I'd rather a README PR because adding newrelic specific stuff in the code isn't so great IMO..
At https://laruchequiditoui.fr/, we have an API monitored with New Relic.
For some time we have a strange
/unknown
route with high throughput:Looking at the documentation we thought it was a configuration problem on our side.
But we calculated the route is about 30% of our traffic and when we looked at our HTTP logs, only responses of
OPTIONS
requests were generated in less than 10 ms.These so-called preflight responses are generated by
NelmioCorsBundle
.We are wondering if it would be a good idea to offer a configuration option to ignore the transactions.
Thoughts?