1
0
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:
Barry vd. Heuvel
2016-12-17 22:30:44 +01:00
committed by GitHub
parent e7f2b72231
commit 0fdbad81ea

View File

@@ -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);
}