Fix 0x0.st upload 403 by adding User-Agent header
This commit is contained in:
1 parent
cdb58a0e08
commit
18d37765c1
1 file changed
+4
-1
@@ -80,7 +80,10 @@ pub async fn upload_logs_to_paste(content: String) -> Result<String, String> {
|
||||
.map_err(|e| format!("Failed to create multipart part: {}", e))?
|
||||
);
|
||||
|
||||
let client = reqwest::Client::new();
|
||||
let client = reqwest::Client::builder()
|
||||
.user_agent("QBZ/1.0")
|
||||
.build()
|
||||
.map_err(|e| format!("Failed to create HTTP client: {}", e))?;
|
||||
let response = client
|
||||
.post("https://0x0.st")
|
||||
.multipart(form)
|
||||
|
||||
Reference in new issue
Block a user