Laravel-debugbar: How to disable it in API Routes ?

Created on 5 Oct 2017  路  5Comments  路  Source: barryvdh/laravel-debugbar

\Debugbar::disable(); Didn't worked!

debg

stale

Most helpful comment

https://github.com/barryvdh/laravel-debugbar/blob/master/config/debugbar.php#L19

Set except to api*

But this shouldn't happen if you set your headers correctly. The debugbar is not appended on XHR requests or when the response is json. Are you sending the correct content type?

All 5 comments

https://github.com/barryvdh/laravel-debugbar/blob/master/config/debugbar.php#L19

Set except to api*

But this shouldn't happen if you set your headers correctly. The debugbar is not appended on XHR requests or when the response is json. Are you sending the correct content type?

Yes i am Using POST, Sending JSON input and returning JSON data in responce! where to set api*

Dang, I'm stuck on 2.4. I'm porting a rough api to Laravel. Users don't always request return type (aka could be html).

Thanks @barryvdh This was helpful for those endpoints that return something other than JSON and are not XHR requests. :)

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this issue is still present on the latest version of this library on supported Laravel versions, please let us know by replying to this issue so we can investigate further.
Thank you for your contribution! Apologies for any delayed response on our side.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Megachill picture Megachill  路  3Comments

beneverard picture beneverard  路  6Comments

innerdev picture innerdev  路  5Comments

lozadaOmr picture lozadaOmr  路  6Comments

thomthom picture thomthom  路  5Comments