Documentation Revamp
Co-authored-by: jbdoumenjou <jb.doumenjou@gmail.com>
This commit is contained in:
parent
848e45c22c
commit
ac6b11037d
174 changed files with 5858 additions and 4002 deletions
40
docs/content/middlewares/chain.md
Normal file
40
docs/content/middlewares/chain.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
# Chain
|
||||
|
||||
When One Isn't Enougth
|
||||
{: .subtitle }
|
||||
|
||||

|
||||
|
||||
The Chain middleware enables you to define reusable combinations of other pieces of middleware.
|
||||
It makes reusing the same groups easier.
|
||||
|
||||
## Configuration Example
|
||||
|
||||
??? example "A Chain for WhiteList, BasicAuth, and HTTPS"
|
||||
|
||||
```toml
|
||||
# ...
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
service = "service1"
|
||||
middlewares = ["secured"]
|
||||
rule = "Host: mydomain"
|
||||
|
||||
[Middlewares]
|
||||
[Middlewares.secured.Chain]
|
||||
middlewares = ["https-only", "known-ips", "auth-users"]
|
||||
|
||||
[Middlewares.auth-users.BasicAuth]
|
||||
users = ["test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/"]
|
||||
[Middlewares.https-only.SchemeRedirect]
|
||||
scheme = "https"
|
||||
[Middlewares.known-ips.ipWhiteList]
|
||||
sourceRange = ["192.168.1.7", "x.x.x.x", "x.x.x.x"]
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://127.0.0.1:80"
|
||||
Weight = 1
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue