Skip to content

Commit bdfd2cb

Browse files
authored
fix: confirmation rate-limit errors (#510)
Add the browser-style `Accept-Language` header to bulk confirmation requests. Steam Community now appears to require this header on non-GET requests and otherwise eventually responds with HTTP 429. Closes #509 ## Testing - `cargo test -p steamguard` (22 passed)
1 parent f1ffe2b commit bdfd2cb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

steamguard/src/confirmation.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ where
239239
"application/x-www-form-urlencoded; charset=UTF-8",
240240
)
241241
.header("Origin", "https://steamcommunity.com")
242+
// Steam Community eventually returns HTTP 429 without this browser-style header.
243+
.header("Accept-Language", "en-US,en;q=0.9")
242244
.body(query_params)
243245
.send()?;
244246

0 commit comments

Comments
 (0)