HTTP directives

proxy_set_body directive (HTTP)

Replace the request payload with controlled text or an expression. Align the method and media type with the origin contract. Context: http, server, location. Documented default: none. Version: Introduction not established. OSS documentation; verify build and version. Partial configuration for an isolated synthetic lab; not a production policy.

Formal Syntax & Structure

nginx syntaxnginx
proxy_set_body value;

Parameters & Attributes

NameTypeDescription
valuestring expressionSynthetic payload; do not interpolate untrusted text into structured data without encoding.

Working Example

Example Snippetnginx
proxy_method POST;proxy_set_header Content-Type text/plain;proxy_set_body "lab-ping";
Nginx Reference