Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfd68a63

Browse files
ethanndicksonaslilac
authored andcommitted
fix: block vpn tailnet endpoint when--browser-only is set (#16647)
The work on CoderVPN required a new user-scoped `/tailnet` endpoint forcoordinating with multiple workspace agents, and receiving workspaceupdates. Much like the `/coordinate` endpoint, this needs to respect the`CODER_BROWSER_ONLY`/`--browser-only` deployment config value.
1 parent064c2d4 commitfd68a63

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎coderd/workspaceagents.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,7 @@ func (api *API) workspaceAgentClientCoordinate(rw http.ResponseWriter, r *http.R
906906
}
907907

908908
// This is used by Enterprise code to control the functionality of this route.
909+
// Namely, disabling the route using `CODER_BROWSER_ONLY`.
909910
override:=api.WorkspaceClientCoordinateOverride.Load()
910911
ifoverride!=nil {
911912
overrideFunc:=*override
@@ -1576,6 +1577,16 @@ func (api *API) workspaceAgentsExternalAuthListen(ctx context.Context, rw http.R
15761577
func (api*API)tailnetRPCConn(rw http.ResponseWriter,r*http.Request) {
15771578
ctx:=r.Context()
15781579

1580+
// This is used by Enterprise code to control the functionality of this route.
1581+
// Namely, disabling the route using `CODER_BROWSER_ONLY`.
1582+
override:=api.WorkspaceClientCoordinateOverride.Load()
1583+
ifoverride!=nil {
1584+
overrideFunc:=*override
1585+
ifoverrideFunc!=nil&&overrideFunc(rw) {
1586+
return
1587+
}
1588+
}
1589+
15791590
version:="2.0"
15801591
qv:=r.URL.Query().Get("version")
15811592
ifqv!="" {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp