- id: "ory:kratos:public"
upstream:
preserve_host: true
url: "http://kratos:4433"
strip_path: /.ory/kratos/public
match:
url: "http://oathkeeper:4455/.ory/kratos/public/<**>"
methods:
- GET
- POST
- PUT
- DELETE
- PATCH
authenticators:
- handler: noop
authorizer:
handler: allow
mutators:
- id: "dashboard:anonymous"
url: "http://dashboard:3000"
url: "http://oathkeeper:4455/<{_next/**,auth/**,recovery,verify,error,favicon.ico}{/,}>"
- handler: anonymous
- id: "dashboard:protected"
url: "http://oathkeeper:4455/<{,api/**,settings,uploads,downloads,payments}>"
- handler: cookie_session
- handler: id_token
- handler: header
config:
headers:
X-User: "{{ print .Subject }}"
errors:
- handler: redirect
to: http://127.0.0.1/auth/login
- id: "accounts:anonymous"
url: "http://accounts:3000"
url: "http://oathkeeper<{,:4455}>/<{health,stripe/prices,stripe/webhook}>"
- id: "accounts:public"
url: "http://oathkeeper<{,:4455}>/<{user/limits}>"
- id: "accounts:protected"
url: "http://oathkeeper<{,:4455}>/<{login,logout,user,user/uploads,user/uploads/*,user/downloads,user/stats}>"