Skip to content

Commit 50c9449

Browse files
committed
chore: relax wsproxy version checking
1 parent f89b680 commit 50c9449

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

enterprise/coderd/workspaceproxy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,9 +572,9 @@ func (api *API) workspaceProxyRegister(rw http.ResponseWriter, r *http.Request)
572572
}
573573

574574
// Version check should be forced in non-dev builds and when running in
575-
// tests.
575+
// tests. Only Major + minor versions are checked.
576576
shouldForceVersion := !buildinfo.IsDev() || flag.Lookup("test.v") != nil
577-
if shouldForceVersion && req.Version != buildinfo.Version() {
577+
if shouldForceVersion && !buildinfo.VersionsMatch(req.Version, buildinfo.Version()) {
578578
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
579579
Message: "Version mismatch.",
580580
Detail: fmt.Sprintf("Proxy version %q does not match primary server version %q", req.Version, buildinfo.Version()),

0 commit comments

Comments
 (0)