HTTP directives

proxy_method directive (HTTP)

Override the method sent to the origin. Do not treat method rewriting as an authorization control. Context: http, server, location. Documented default: original client method. Version: Introduction not established. OSS documentation; verify build and version. Body suppression avoids forwarding an unintended body in this example. Partial configuration for an isolated synthetic lab; not a production policy.

Formal Syntax & Structure

nginx syntaxnginx
proxy_method method;

Parameters & Attributes

NameTypeDescription
methodHTTP method or expressionChoose a method supported by the synthetic origin; variable support since 1.11.6.

Working Example

Example Snippetnginx
proxy_method GET;proxy_pass_request_body off;proxy_set_header Content-Length "";
Nginx Reference