oathkeeper:
config:
errors:
fallback:
- json
handlers:
redirect:
enabled: true
config:
# to: "https://myapp.io/auth/login"
when:
- error:
- unauthorized
- forbidden
to: https://myapp.io/auth/login
request:
header:
accept:
- text/html
- text/*
when:
- error:
- not_found
to: https://myapp.io/errors/404
request:
header:
accept:
- text/html
- text/*
when:
- error:
- internal_server_error
to: https://myapp.io/errors/500
request:
header:
accept:
- text/html
- text/*
What’s your question exactly?
I want to know if it supports different types of errors to redirect to different URLs, such as unauthorized
redirects to https://myapp.io/auth/login, and not_found
redirects to https://myapp.io/errors/not-found