Skip to content

Commit

Permalink
fix: allow more user agent formats
Browse files Browse the repository at this point in the history
  • Loading branch information
deyhle committed Dec 11, 2023
1 parent 076ec30 commit d59eed3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TokenStore.ts
Expand Up @@ -240,7 +240,7 @@ export class TokenStore {
throw new Error('agent cannot be undefined');
}

if (!/^(?:\w+\/[\w.+-]+(?: \([\w,; ]+\))? ?)+$/.test(agent)) {
if (!/^(?:\w+\/?[\w\.+-]+(?: \([\w,;\./ ]+\))? ?)+/.test(agent)) {
throw new Error('agent is malformed');
}

Expand Down

0 comments on commit d59eed3

Please sign in to comment.