Skip to content

Commit

Permalink
Change adding headers
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh committed Jul 13, 2015
1 parent e706f82 commit a524a01
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 74 deletions.
11 changes: 11 additions & 0 deletions src/LaravelDebugbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,10 @@ public function modifyResponse($request, $response)
}
}

if ($app['config']->get('debugbar.clockwork')) {
$this->addClockworkHeaders($response);
}

// Stop further rendering (on subrequests etc)
$this->disable();

Expand Down Expand Up @@ -821,4 +825,11 @@ protected function selectStorage(DebugBar $debugbar)
$debugbar->setStorage($storage);
}
}

protected function addClockworkHeaders($response)
{
$response->headers->set('X-Clockwork-Id', $this->getCurrentRequestId(), true);
$response->headers->set('X-Clockwork-Version', 1, true);
$response->headers->set('X-Clockwork-Path','/_debugbar/clockwork/', true);
}
}
5 changes: 0 additions & 5 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,6 @@ public function boot()
$debugbar->boot();

$kernel = $this->app['Illuminate\Contracts\Http\Kernel'];

if ($this->app['config']->get('debugbar.clockwork')) {
$kernel->pushMiddleware('Barryvdh\Debugbar\Support\Clockwork\Middleware');
}

$kernel->pushMiddleware('Barryvdh\Debugbar\Middleware\Debugbar');
}

Expand Down
69 changes: 0 additions & 69 deletions src/Support/Clockwork/Middleware.php

This file was deleted.

0 comments on commit a524a01

Please sign in to comment.