Uh, interesting! To be honest, my first thought was that it sounds like some CORS issue, do you have a link to discussion about that issue?
The JWTBearer class inherits from the HTTPBearer class which we call here:
`credentials: HTTPAuthorizationCredentials = await super().__call__(request)`
I'd add a some custom logic before that to check your custom header first and only look in "Authorization" if it doesn't find anything there:
```
# Check in custom header first
authorization: str = request.headers.get("X-CustomAuthorizationHeader")
scheme, creds = get_authorization_scheme_param(authorization)
credentials = HTTPAuthorizationCredentials(
scheme=scheme, credentials=creds
) if authorization and scheme and creds else None
if not credentials:
credentials: HTTPAuthorizationCredentials = await super().__call__(request)
...
```
I haven't tested it tbh but this is roughly how I'd approach it.