# services/oauth2-proxy/middleware-errors.yaml
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
  name: oauth2-proxy-errors
  namespace: sso
spec:
  errors:
    status:
      - "401"
      - "403"
    service:
      name: oauth2-proxy
      port: 80
    query: /oauth2/start?rd={url}
