mirror of
https://github.com/caddyserver/website.git
synced 2025-06-22 14:10:32 -04:00
docs: method
directive
This commit is contained in:
parent
2581eba019
commit
7f754b0e13
2 changed files with 28 additions and 1 deletions
|
@ -49,6 +49,7 @@ Directive | Description
|
||||||
**[import](/docs/caddyfile/directives/import)** | Include snippets or files
|
**[import](/docs/caddyfile/directives/import)** | Include snippets or files
|
||||||
**[log](/docs/caddyfile/directives/log)** | Enables access/request logging
|
**[log](/docs/caddyfile/directives/log)** | Enables access/request logging
|
||||||
**[map](/docs/caddyfile/directives/map)** | Maps an input value to one or more outputs
|
**[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
|
**[metrics](/docs/caddyfile/directives/metrics)** | Configures the Prometheus metrics exposition endpoint
|
||||||
**[php_fastcgi](/docs/caddyfile/directives/php_fastcgi)** | Serve PHP sites over FastCGI
|
**[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
|
**[push](/docs/caddyfile/directives/push)** | Push content to the client using HTTP/2 server push
|
||||||
|
@ -115,7 +116,8 @@ request_body
|
||||||
|
|
||||||
redir
|
redir
|
||||||
|
|
||||||
# URI manipulation
|
# incoming request manipulation
|
||||||
|
method
|
||||||
rewrite
|
rewrite
|
||||||
uri
|
uri
|
||||||
try_files
|
try_files
|
||||||
|
|
25
src/docs/markdown/caddyfile/directives/method.md
Normal file
25
src/docs/markdown/caddyfile/directives/method.md
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
title: method (Caddyfile directive)
|
||||||
|
---
|
||||||
|
|
||||||
|
# method
|
||||||
|
|
||||||
|
Rewrites the request to change the HTTP method.
|
||||||
|
|
||||||
|
|
||||||
|
## Syntax
|
||||||
|
|
||||||
|
```caddy-d
|
||||||
|
method [<matcher>] <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
|
||||||
|
```
|
Loading…
Add table
Add a link
Reference in a new issue