Skip to content

Commit

Permalink
Fix wallet download issue (#1865)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/414235014887631/1205114051781535/f

Description:
Adds user agent to download tasks
  • Loading branch information
Bunn authored Jul 26, 2023
1 parent fe22f50 commit 98592c3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion DuckDuckGo/URLDownloadSession.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ class URLDownloadSession: NSObject, DownloadSession {
if let session = session {
self.session = session
} else {
self.session = URLSession(configuration: .ephemeral, delegate: self, delegateQueue: .main)
let configuration = URLSessionConfiguration.ephemeral
let userAgent = DefaultUserAgentManager.shared.userAgent(isDesktop: false)
configuration.httpAdditionalHeaders = ["user-agent": userAgent]
self.session = URLSession(configuration: configuration, delegate: self, delegateQueue: .main)
}
self.task = self.session?.downloadTask(with: url)
}
Expand Down

0 comments on commit 98592c3

Please sign in to comment.