fruitcake / laravel-cors

Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application
MIT License
6.27k stars 613 forks source link

HandleCors takes 19% of the time to process my requests #524

Closed lucianobargmann closed 3 years ago

lucianobargmann commented 3 years ago

How can I disable Fruitcake? It is # time consuming element in all my requests:

[ removed image ]

barryvdh commented 3 years ago

That seems weird, but all of your request logic probably takes place inside the handle, because of the way the middle ware wraps around the rest (onion layers). But you can just remove the middle ware and package from your app.

lucianobargmann commented 3 years ago

Thanks Barry, So you are saying that HandleCors::handle is being reported as the wrapper for all my request in New Relic? I can see my actual request methods being called. I think your package comes with Laravel now. I tried removing it just like you said, and got a bunch of errors - will do more research. THanks for your time.