# DebugResponseHeaders

> Applies defense-in-depth headers to debugger responses without preventing the same-origin toolbar iframe.

[API reference](/docs/api/index.md) › [Debug](/docs/extensions/debug/reference/index.md) › DebugResponseHeaders

| final class | `yii\debug\DebugResponseHeaders` |
| --- | --- |
| Source | [`src/DebugResponseHeaders.php`](https://github.com/yii2-extensions/debug/blob/main/src/DebugResponseHeaders.php#L18) |

Applies defense-in-depth headers to debugger responses without preventing the same-origin toolbar iframe.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`apply()`](#method-apply) static | Sets the hardening headers and rewrites every Content-Security-Policy value on the response. | `DebugResponseHeaders` |

## Method details

### apply() <span id="method-apply"></span>

```php
public static function apply(yii\web\Response $response): void
```

Sets the hardening headers and rewrites every Content-Security-Policy value on the response.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$response` | [`yii\web\Response`](/docs/api/yii/web/response/index.md) | Debugger response to harden. |