diff --git a/ios/MullvadREST/HTTP.swift b/ios/MullvadREST/HTTP.swift index 900ab2a49aee..93074fdbd35a 100644 --- a/ios/MullvadREST/HTTP.swift +++ b/ios/MullvadREST/HTTP.swift @@ -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" } diff --git a/ios/MullvadREST/RESTRequestFactory.swift b/ios/MullvadREST/RESTRequestFactory.swift index 00ed23e9aea2..f0a3f3334eb4 100644 --- a/ios/MullvadREST/RESTRequestFactory.swift +++ b/ios/MullvadREST/RESTRequestFactory.swift @@ -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