fix: fix review comments, again😉
- Remove unnecessary auth header name check - Extract operations on headers into a function
This commit is contained in:
parent
13f736033a
commit
2870441fea
1 changed files with 39 additions and 44 deletions
|
|
@ -301,9 +301,6 @@ 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;
|
||||
if (headerName) {
|
||||
headers["x-custom-auth-header"] = headerName;
|
||||
}
|
||||
} else {
|
||||
headers[authHeaderName] = `Bearer ${token}`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue