File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Coder-Desktop/Coder-Desktop/Views Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -194,8 +194,8 @@ func validateURL(_ url: String) throws(LoginError) -> URL {
194
194
guard let url = URL ( string: url) else {
195
195
throw . invalidURL
196
196
}
197
- guard url. scheme == " https " else {
198
- throw . httpsRequired
197
+ guard url. scheme == " https " || url . scheme == " http " else {
198
+ throw . invalidScheme
199
199
}
200
200
guard url. host != nil else {
201
201
throw . noHost
@@ -204,7 +204,7 @@ func validateURL(_ url: String) throws(LoginError) -> URL {
204
204
}
205
205
206
206
enum LoginError : Error {
207
- case httpsRequired
207
+ case invalidScheme
208
208
case noHost
209
209
case invalidURL
210
210
case outdatedCoderVersion
@@ -213,12 +213,12 @@ enum LoginError: Error {
213
213
214
214
var description : String {
215
215
switch self {
216
- case . httpsRequired :
217
- " URL must use HTTPS "
216
+ case . invalidScheme :
217
+ " Coder URL must use HTTPS or HTTP "
218
218
case . noHost:
219
- " URL must have a host "
219
+ " Coder URL must have a host"
220
220
case . invalidURL:
221
- " Invalid URL "
221
+ " Invalid Coder URL "
222
222
case . outdatedCoderVersion:
223
223
"""
224
224
The Coder deployment must be version \( Validator . minimumCoderVersion)
You can’t perform that action at this time.
0 commit comments