# filter_request_headers

> **Function** in `langsmith`

📖 [View in docs](https://reference.langchain.com/python/langsmith/utils/filter_request_headers)

Filter request headers based on `ignore_hosts` and `allow_hosts`.

## Signature

```python
filter_request_headers(
    request: Any,
    *,
    ignore_hosts: Optional[Sequence[str]] = None,
    allow_hosts: Optional[Sequence[str]] = None,
) -> Any
```

---

[View source on GitHub](https://github.com/langchain-ai/langsmith-sdk/blob/19dc497a3d89638e4cc35db72ea1c29cad35cbbf/python/langsmith/utils.py#L544)