mirror of
https://github.com/caddyserver/website.git
synced 2025-04-24 05:56:15 -04:00
Initial commit
This commit is contained in:
commit
03b6fddeb0
77 changed files with 7599 additions and 0 deletions
28
src/docs/markdown/caddyfile/directives/request_header.md
Normal file
28
src/docs/markdown/caddyfile/directives/request_header.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
title: request_header (Caddyfile directive)
|
||||
---
|
||||
|
||||
# request_header
|
||||
|
||||
Manipulates HTTP header fields on the request. It can set, add, and delete header values, or perform replacements using regular expressions.
|
||||
|
||||
|
||||
## Syntax
|
||||
|
||||
```
|
||||
request_header [<matcher>] [[+|-]<field> [<value>|<find>] [<replace>]]
|
||||
```
|
||||
|
||||
- **<field>** is the name of the header field. By default, will overwrite any existing field of the same name. Prefix with `+` to add the field instead of replace, or prefix with `-` to remove the field.
|
||||
- **<value>** is the header field value, if adding or setting a field.
|
||||
- **<find>** is the substring or regular expression to search for.
|
||||
- **<replace>** is the replacement value; required if performing a search-and-replace.
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
Remove the Referer header from the request:
|
||||
|
||||
```
|
||||
request_header -Referer
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue