mirror of
https://github.com/immich-app/immich.git
synced 2025-07-31 15:08:44 -04:00
fix: include port in baseURL
This commit is contained in:
parent
0a90f490f2
commit
c6cd4dce78
@ -102,7 +102,13 @@ class ImmichAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static func validateServer(at endpointURL: URL) async -> URL? {
|
private static func validateServer(at endpointURL: URL) async -> URL? {
|
||||||
let baseURL = URL(string: endpointURL.scheme! + "://" + endpointURL.host!)!
|
// build a URL that is only scheme, host, and port
|
||||||
|
var components = URLComponents()
|
||||||
|
components.scheme = endpointURL.scheme
|
||||||
|
components.host = endpointURL.host
|
||||||
|
components.port = endpointURL.port
|
||||||
|
|
||||||
|
guard let baseURL = components.url else { return nil }
|
||||||
|
|
||||||
var pingURL = baseURL
|
var pingURL = baseURL
|
||||||
pingURL.appendPathComponent(".well-known")
|
pingURL.appendPathComponent(".well-known")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user