Skip to content

Commit

Permalink
Update user-agent when calling Phrase (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
jahredhope authored Jul 11, 2024
1 parent 17cc753 commit f0b80de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/great-poems-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@vocab/phrase': patch
---

Update user-agent when calling Phrase to reference Vocab repository
2 changes: 1 addition & 1 deletion packages/phrase/src/phrase-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function _callPhrase(path: string, options: Parameters<typeof fetch>[1] = {}) {
headers: {
Authorization: `token ${phraseApiToken}`,
// Provide identification via User Agent as requested in https://developers.phrase.com/api/#overview--identification-via-user-agent
'User-Agent': 'SEEK Demo Candidate App (jhope@seek.com.au)',
'User-Agent': 'Vocab Client (https://github.com/seek-oss/vocab)',
...options.headers,
},
}).then(async (response) => {
Expand Down

0 comments on commit f0b80de

Please sign in to comment.