Skip to content

Commit afc40c2

Browse files
committed
chore: support http coder urls
1 parent f5d0741 commit afc40c2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Coder-Desktop/Coder-Desktop/Views/LoginForm.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ func validateURL(_ url: String) throws(LoginError) -> URL {
194194
guard let url = URL(string: url) else {
195195
throw .invalidURL
196196
}
197-
guard url.scheme == "https" else {
198-
throw .httpsRequired
197+
guard url.scheme == "https" || url.scheme == "http" else {
198+
throw .invalidScheme
199199
}
200200
guard url.host != nil else {
201201
throw .noHost
@@ -204,7 +204,7 @@ func validateURL(_ url: String) throws(LoginError) -> URL {
204204
}
205205

206206
enum LoginError: Error {
207-
case httpsRequired
207+
case invalidScheme
208208
case noHost
209209
case invalidURL
210210
case outdatedCoderVersion
@@ -213,10 +213,10 @@ enum LoginError: Error {
213213

214214
var description: String {
215215
switch self {
216-
case .httpsRequired:
217-
"URL must use HTTPS"
216+
case .invalidScheme:
217+
"Coder URL must use HTTPS or HTTP"
218218
case .noHost:
219-
"URL must have a host"
219+
"Coder URL must have a host"
220220
case .invalidURL:
221221
"Invalid URL"
222222
case .outdatedCoderVersion:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy