diff --git a/src/docs/markdown/caddyfile/directives.md b/src/docs/markdown/caddyfile/directives.md index d32d97d..21c21f1 100644 --- a/src/docs/markdown/caddyfile/directives.md +++ b/src/docs/markdown/caddyfile/directives.md @@ -49,6 +49,7 @@ Directive | Description **[import](/docs/caddyfile/directives/import)** | Include snippets or files **[log](/docs/caddyfile/directives/log)** | Enables access/request logging **[map](/docs/caddyfile/directives/map)** | Maps an input value to one or more outputs +**[method](/docs/caddyfile/directives/method)** | Rewrite the HTTP method **[metrics](/docs/caddyfile/directives/metrics)** | Configures the Prometheus metrics exposition endpoint **[php_fastcgi](/docs/caddyfile/directives/php_fastcgi)** | Serve PHP sites over FastCGI **[push](/docs/caddyfile/directives/push)** | Push content to the client using HTTP/2 server push @@ -115,7 +116,8 @@ request_body redir -# URI manipulation +# incoming request manipulation +method rewrite uri try_files diff --git a/src/docs/markdown/caddyfile/directives/method.md b/src/docs/markdown/caddyfile/directives/method.md new file mode 100644 index 0000000..a7c51f8 --- /dev/null +++ b/src/docs/markdown/caddyfile/directives/method.md @@ -0,0 +1,25 @@ +--- +title: method (Caddyfile directive) +--- + +# method + +Rewrites the request to change the HTTP method. + + +## Syntax + +```caddy-d +method [] +``` + +- **<method>** is the HTTP method to change the request to. + + +## Examples + +Change the method for all requests under `/api` to `POST`: + +```caddy-d +method /api* POST +```