Skip to content

feat: support http coder urls #217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Coder-Desktop/Coder-Desktop/Views/LoginForm.swift
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ func validateURL(_ url: String) throws(LoginError) -> URL {
guard let url = URL(string: url) else {
throw .invalidURL
}
guard url.scheme == "https" else {
throw .httpsRequired
guard url.scheme == "https" || url.scheme == "http" else {
throw .invalidScheme
}
guard url.host != nil else {
throw .noHost
Expand All @@ -204,7 +204,7 @@ func validateURL(_ url: String) throws(LoginError) -> URL {
}

enum LoginError: Error {
case httpsRequired
case invalidScheme
case noHost
case invalidURL
case outdatedCoderVersion
Expand All @@ -213,12 +213,12 @@ enum LoginError: Error {

var description: String {
switch self {
case .httpsRequired:
"URL must use HTTPS"
case .invalidScheme:
"Coder URL must use HTTPS or HTTP"
case .noHost:
"URL must have a host"
"Coder URL must have a host"
case .invalidURL:
"Invalid URL"
"Invalid Coder URL"
case .outdatedCoderVersion:
"""
The Coder deployment must be version \(Validator.minimumCoderVersion)
Expand Down
Loading