Skip to main content

Max-Forwards

RequestActive

Max-Forwards limits the number of times a TRACE or OPTIONS request can be forwarded by proxies. Each proxy decrements the value by 1. When it reaches 0, the proxy returns the request without forwarding it. This prevents infinite forwarding loops and allows debugging of specific proxy hops.

Max-Forwards: <number>

Description

Max-Forwards is used exclusively with TRACE and OPTIONS methods. A TRACE with Max-Forwards: 0 returns immediately from the first server, showing only one hop. Max-Forwards: 3 allows the request to pass through up to 3 proxies. Since TRACE is disabled on most production servers due to the XST attack, Max-Forwards is rarely seen in practice. OPTIONS is more common for CORS preflight discovery.

Examples

Trace with limit
http
TRACE / HTTP/1.1
Host: example.com
Max-Forwards: 3

Specification

RFC 9110Max-Forwards specification →