• André Frimberger's avatar
    fix binascii.Error with reverse proxy bearer token · 7a608b4f
    André Frimberger authored
    When an authenticating reverse proxy (e.g. Keycloak Gatekeeper) adds a Bearer token in the Authorization header, every request fails with HTTP status code 500.  The corresponding error in the logs is: binascii.Error: Incorrect padding. 
    Despite "reverse_proxy_header_login" is enabled, calibre-web tries first to base64decode the bearer token and fails. This patch just reverses the order in which the authentication methods  are checked.
    7a608b4f
web.py 66.3 KB