Skip to content

Commit

Permalink
Changes deepl api authentication to Authorization header.
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Weidacher committed Jan 8, 2025
1 parent 4c504c9 commit dd42ae6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/translators/engines/deepl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ deepl.interceptors.request.use((req) => {
? 'https://api-free.deepl.com/v2'
: 'https://api.deepl.com/v2'

req.params = {
auth_key: Config.deeplApiKey,
}
req.headers['Authorization'] = `DeepL-Auth-Key ${Config.deeplApiKey}`

if (req.method === 'POST' || req.method === 'post') {
req.headers['Content-Type'] = 'application/x-www-form-urlencoded'
Expand Down

0 comments on commit dd42ae6

Please sign in to comment.