==== TraceHandler

By default, Jooby does not support `HTTP TRACE` requests. To enable them for debugging or diagnostic purposes, you can use the javadoc:handler.TraceHandler[].

The javadoc:handler.TraceHandler[] implements a loop-back test by returning the received request message back to the client as the entity body of a 200 (OK) response.

.Usage
[source, java, role = "primary"]
----
import io.jooby.handler.TraceHandler;

{
  use(new TraceHandler()); // <1>
  
  get("/", ctx -> "Hello World");
}
----

.Kotlin
[source, kotlin, role = "secondary"]
----
import io.jooby.handler.TraceHandler

{
  use(TraceHandler())      // <1>
  
  get("/") { "Hello World" }
}
----

<1> Install the `TraceHandler` as a decorator.

When a `TRACE` request is received, the handler bypasses the normal route logic and echoes the request headers and body back to the client. This is useful for seeing what transformations are being applied to the request by intermediate proxies or firewalls.

[WARNING]
====
`HTTP TRACE` can potentially expose sensitive information (like cookies or authentication headers) to malicious scripts (Cross-Site Tracing). It is generally recommended to enable this handler only in development or strictly controlled diagnostic environments.
====
