fix: Fix the issue of accidentally losing 'x-custom-auth-header'

This commit is contained in:
xiaoli 2025-05-29 11:49:57 +08:00
commit 10e3202832

View file

@ -301,6 +301,7 @@ export function useConnection({
// Add custom header name as a special request header to let the server know which header to pass through
if (authHeaderName.toLowerCase() !== "authorization") {
headers[authHeaderName] = token;
headers["x-custom-auth-header"] = authHeaderName;
} else {
headers[authHeaderName] = `Bearer ${token}`;
}