mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Remove authorization header from token refresh request (#16199)
This commit is contained in:
@@ -109,8 +109,8 @@ export async function refresh({ navigate }: LogoutOptions = { navigate: true }):
|
||||
try {
|
||||
const response = await api.post<any>('/auth/refresh', undefined, {
|
||||
transformRequest(data, headers) {
|
||||
// This seems wrongly typed in Axios itself..
|
||||
delete (headers?.common as unknown as Record<string, string>)?.['Authorization'];
|
||||
// Remove Authorization header from request
|
||||
headers.set('Authorization');
|
||||
return data;
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user