---
title: Fastly-Debug
summary: null
url: https://www.fastly.com/documentation/reference/http/http-headers/Fastly-Debug
---

If an inbound request has the `Fastly-Debug` header set (conventionally to `1` but actually any value is acceptable), this will prompt Fastly cache servers to output additional response headers:

- `Fastly-Debug-Path`
- `Fastly-Debug-TTL`
- `Fastly-Debug-Digest`

The presence of the header will also prevent the following headers from being removed, if they are already present on a response:

- `Surrogate-Key`
- `Surrogate-Control`

If you wish to prevent users from triggering debug information in the response on your Fastly service, you can choose to strip the header from the request.  Since it is often useful to retain the capability for your own use, you could require it to be set to a more obscure value:

```vcl context="vcl_recv { ... }"
if (req.http.Fastly-Debug != "o37valg966qgfit63-5iw877gvfgq1") {
  unset req.http.Fastly-Debug;
}
```

> **HINT:** By default, the `Fastly-Debug` request header is passed on to origins. If using [service chaining](https://www.fastly.com/documentation/guides/getting-started/services/service-chaining/), other services within the chain might send more debug information which may be cached by the service and sent back to users. To avoid this, add `unset http.bereq.Fastly-Debug;` in both `vcl_miss` and `vcl_pass`.
