11 lines
295 B
JavaScript
11 lines
295 B
JavaScript
const addAuthHeader = ($, requestConfig) => {
|
|
if ($.auth.data?.authenticationKey) {
|
|
const authorizationHeader = `DeepL-Auth-Key ${$.auth.data.authenticationKey}`;
|
|
requestConfig.headers.Authorization = authorizationHeader;
|
|
}
|
|
|
|
return requestConfig;
|
|
};
|
|
|
|
export default addAuthHeader;
|