Skip to content

Commit 788aadf

Browse files
X-NC-CheckUnauthorized
Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
1 parent 97dedf7 commit 788aadf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/NextcloudKit/NKMonitor.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ final class NKMonitor: EventMonitor, Sendable {
3434
//
3535
if let statusCode = response.response?.statusCode,
3636
statusCode == 401,
37-
let isCheckUnauthorized = request.request?.allHTTPHeaderFields?["X-NC-CheckUnauthorized"] as? Bool,
38-
isCheckUnauthorized,
37+
let headerValue = request.request?.allHTTPHeaderFields?["X-NC-CheckUnauthorized"],
38+
headerValue.lowercased() == "true",
3939
let account = request.request?.allHTTPHeaderFields?["X-NC-Account"] as? String {
4040

4141
var unauthorizedArray = groupDefaults?.array(forKey: "Unauthorized") as? [String] ?? []

0 commit comments

Comments
 (0)