abiosoft / abiosoft/caddy-yaml
How to properly use forward_auth?
- Lenguaje dominante
- Go
- Estrellas
- 30
- Forks
- 2
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hi! Could you please provide an example of using `forward_auth`?
When I try to use it, I get the following error:
```
caddy | Error: loading initial config: loading new config: loading http app module: provision http: server web: setting up route handlers: route 1: loading handler modules: position 0: loading module 'subroute': provision http.handlers.subroute: setting up subroutes: route 0: loading handler modules: position 0: loading module 'forward_auth': unknown module: http.handlers.forward_auth
```
Config example:
```
x-forwardAuth: &forwardAuth
handler: forward_auth
uri: "host.docker.internal:8090/api/otp/verify"
apps:
http:
servers:
web:
listen:
- ":443"
- ":80"
routes:
- match:
- host: ["nginx.#{ $BASE_DOMAIN }"]
handle:
- handler: subroute
routes:
- handle:
- <<: *forwardAuth
- handler: reverse_proxy
upstreams:
- dial: "nginx:80"
```
I tried to see how it looks in the JSON configuration format, but Caddy converts forward_auth into a huge number of rules related to reverse_proxy…
https://caddyserver.com/docs/caddyfile/directives/forward_auth
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.