Skip to content

Commit

Permalink
Merge branch 'ios-add-user-agent'
Browse files Browse the repository at this point in the history
  • Loading branch information
buggmagnet committed Oct 12, 2023
2 parents 558858d + a2cfdb0 commit 30b81b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ios/MullvadREST/HTTP.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ enum HTTPHeader {
static let contentType = "Content-Type"
static let etag = "ETag"
static let ifNoneMatch = "If-None-Match"
static let userAgent = "User-Agent"
}
1 change: 1 addition & 0 deletions ios/MullvadREST/RESTRequestFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ extension REST {
request.httpShouldHandleCookies = false
request.addValue(hostname, forHTTPHeaderField: HTTPHeader.host)
request.addValue("application/json", forHTTPHeaderField: HTTPHeader.contentType)
request.addValue("mullvad-app", forHTTPHeaderField: HTTPHeader.userAgent)
request.httpMethod = method.rawValue

let prefixedPathTemplate = URLPathTemplate(stringLiteral: pathPrefix) + pathTemplate
Expand Down

0 comments on commit 30b81b0

Please sign in to comment.