mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-07-25 02:31:25 +02:00
Check for unsafe header
Some headers are unsafe to read (in Chrome), checking all returned headers will prevent these errors. See https://github.com/barryvdh/laravel-debugbar/issues/384
This commit is contained in:
@@ -1019,6 +1019,10 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
||||
* @return {Bool}
|
||||
*/
|
||||
handle: function(xhr) {
|
||||
// Check if the debugbar header is available
|
||||
if (xhr.getAllResponseHeaders().indexOf(this.headerName) === -1){
|
||||
return true;
|
||||
}
|
||||
if (!this.loadFromId(xhr)) {
|
||||
return this.loadFromData(xhr);
|
||||
}
|
||||
|
Reference in New Issue
Block a user