Response headers | laravel-markdown-response | Spatie

 SPATIE

  Laravel Markdown Response
============================

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Laravel-markdown-response](https://spatie.be/docs/laravel-markdown-response/v1)  Advanced-usage  Response headers

 Version   v1

 Other versions for crawler [v1](https://spatie.be/docs/laravel-markdown-response/v1)

- [ Introduction ](https://spatie.be/docs/laravel-markdown-response/v1/introduction)
- [ Requirements ](https://spatie.be/docs/laravel-markdown-response/v1/requirements)
- [ Install the package ](https://spatie.be/docs/laravel-markdown-response/v1/installation-setup)
- [ Questions &amp; issues ](https://spatie.be/docs/laravel-markdown-response/v1/questions-issues)
- [ Support us ](https://spatie.be/docs/laravel-markdown-response/v1/support-us)
- [ About us ](https://spatie.be/docs/laravel-markdown-response/v1/about-us)
- [ Changelog ](https://spatie.be/docs/laravel-markdown-response/v1/changelog)

Basic usage
-----------

- [ Serve markdown to AI agents ](https://spatie.be/docs/laravel-markdown-response/v1/basic-usage/serve-markdown-to-ai-agents)
- [ Cache converted responses ](https://spatie.be/docs/laravel-markdown-response/v1/basic-usage/cache-converted-responses)
- [ Choose a conversion driver ](https://spatie.be/docs/laravel-markdown-response/v1/basic-usage/choose-a-conversion-driver)
- [ Test your setup ](https://spatie.be/docs/laravel-markdown-response/v1/basic-usage/test-your-setup)

Advanced usage
--------------

- [ Clean up HTML with preprocessors ](https://spatie.be/docs/laravel-markdown-response/v1/advanced-usage/clean-up-html-with-preprocessors)
- [ Clean up markdown with postprocessors ](https://spatie.be/docs/laravel-markdown-response/v1/advanced-usage/clean-up-markdown-with-postprocessors)
- [ Customize request detection ](https://spatie.be/docs/laravel-markdown-response/v1/advanced-usage/customize-request-detection)
- [ Listen to conversion events ](https://spatie.be/docs/laravel-markdown-response/v1/advanced-usage/listen-to-conversion-events)
- [ Convert HTML directly ](https://spatie.be/docs/laravel-markdown-response/v1/advanced-usage/convert-html-directly)
- [ CDN and cache layers ](https://spatie.be/docs/laravel-markdown-response/v1/advanced-usage/cdn-and-cache-layers)
- [ Response headers ](https://spatie.be/docs/laravel-markdown-response/v1/advanced-usage/response-headers)

 Response headers
================

###  On this page

1. [ Default headers ](#content-default-headers)
2. [ Content-Signal header ](#content-content-signal-header)

Every markdown response includes a set of headers that help AI agents understand and process the content.

Default headers
-----------------------------------------------------------------------------------------------------

These headers are always included:

HeaderValuePurpose`Content-Type``text/markdown; charset=UTF-8`Identifies the response as markdown`Vary``Accept`Tells caches to store separate entries per Accept header`X-Robots-Tag``noindex`Prevents search engines from indexing the markdown version`X-Markdown-Tokens`e.g. `1234`Estimated token count of the markdown contentThe token count is a rough estimate based on the character length of the markdown (characters / 4). It lets AI agents gauge content size from headers before downloading the body.

Content-Signal header
-----------------------------------------------------------------------------------------------------------------------

The `Content-Signal` header communicates to AI agents what they are allowed to do with your content. By default, the package sends:

```
Content-Signal: ai-train=disallow, ai-input=allow, search=allow
```

You can customize these signals in the config file:

```
// config/markdown-response.php

'content_signals' => [
    'ai-train' => 'disallow',
    'ai-input' => 'allow',
    'search' => 'allow',
],
```

Set the array to empty to disable the header entirely:

```
'content_signals' => [],
```
