fix: Fix the issue of accidentally losing 'x-custom-auth-header'
This commit is contained in:
parent
2870441fea
commit
10e3202832
1 changed files with 1 additions and 0 deletions
|
|
@ -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
|
// Add custom header name as a special request header to let the server know which header to pass through
|
||||||
if (authHeaderName.toLowerCase() !== "authorization") {
|
if (authHeaderName.toLowerCase() !== "authorization") {
|
||||||
headers[authHeaderName] = token;
|
headers[authHeaderName] = token;
|
||||||
|
headers["x-custom-auth-header"] = authHeaderName;
|
||||||
} else {
|
} else {
|
||||||
headers[authHeaderName] = `Bearer ${token}`;
|
headers[authHeaderName] = `Bearer ${token}`;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue