abiosoft / abiosoft/caddy-yaml

How to properly use forward_auth?

オープン
#7 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Go
スター
30
フォーク
2
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。