docs: update caddy example (#3566)

This commit is contained in:
James Elliott 2022-06-21 21:27:48 +10:00 committed by GitHub
parent b102ebb6bb
commit 095ebae7a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,7 +173,6 @@ auth.example.com {
# Protected Endpoint.
nextcloud.example.com {
route {
reverse_proxy authelia:9091 {
## This import needs to be included if you're relying on a trusted proxies configuration.
import trusted_proxy_list
@ -191,27 +190,10 @@ nextcloud.example.com {
## 2. Copy the relevant headers from the auth request and provide them to the backend.
@good status 2xx
handle_response @good {
request_header {
Remote-User {http.reverse_proxy.header.Remote-User}
Remote-Groups {http.reverse_proxy.header.Remote-Groups}
Remote-Name {http.reverse_proxy.header.Remote-Name}
Remote-Email {http.reverse_proxy.header.Remote-Email}
}
}
## If the auth request:
## 1. Responds with a status code NOT IN the 200-299 range.
## Then:
## 1. Respond with the status code of the auth request.
## 1. Copy the response except for several headers.
@denied {
status 1xx 3xx 4xx 5xx
}
handle_response @denied {
copy_response
copy_response_headers {
exclude Connection Keep-Alive Te Trailers Transfer-Encoding Upgrade
}
request_header Remote-User {http.reverse_proxy.header.Remote-User}
request_header Remote-Groups {http.reverse_proxy.header.Remote-Groups}
request_header Remote-Name {http.reverse_proxy.header.Remote-Name}
request_header Remote-Email {http.reverse_proxy.header.Remote-Email}
}
}
@ -219,7 +201,6 @@ nextcloud.example.com {
## This import needs to be included if you're relying on a trusted proxies configuration.
import trusted_proxy_list
}
}
}
```