Skip to content

Commit

Permalink
Use bgutils default user agent in requests (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brainicism authored Dec 29, 2024
1 parent 8690a41 commit 88b104a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dependencies": {
"@commander-js/extra-typings": "commander-js/extra-typings",
"axios": "^1.7.9",
"bgutils-js": "^3.1.0",
"bgutils-js": "^3.1.1",
"body-parser": "^1.20.3",
"commander": "^12.1.0",
"express": "^4.21.2",
Expand Down
6 changes: 1 addition & 5 deletions server/src/session_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,7 @@ export class SessionManager {
for (let attempts = 1; attempts <= maxRetries; attempts++) {
try {
const response = await axios.post(url, options.body, {
headers: {
...options.headers,
"User-Agent":
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
},
headers: options.headers,
httpsAgent: dispatcher,
});

Expand Down
8 changes: 4 additions & 4 deletions server/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,10 @@ balanced-match@^1.0.0:
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==

bgutils-js@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/bgutils-js/-/bgutils-js-3.1.0.tgz#b06484e40a653fb42bd75c261f31e499b18e865a"
integrity sha512-2S80c/B4OQFubJLD5ddRRp74utrvjA70x9U0RsIVK7gJaDnaPrbw+bnXWxnEnc0euLznmO9jxOtTTC7FxGmv6w==
bgutils-js@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/bgutils-js/-/bgutils-js-3.1.1.tgz#4dbf1e5110342a9f3b88cedf39d553aedeee6c0f"
integrity sha512-0Vx6jIyIlMWk86MvwCIVr6HCkPv0bZKbiLFlNMGwmLfv3B21mgepajMpryYjLXJ8NT7jwenlXFcZ8ghkT48tGg==

[email protected], body-parser@^1.20.3:
version "1.20.3"
Expand Down

0 comments on commit 88b104a

Please sign in to comment.