Skip to content

Commit 5ac70d5

Browse files
committed
Minor changes
1 parent 82258ef commit 5ac70d5

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

codersdk/deployment.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,8 @@ const (
339339
flagExternalProxies = "external_workspace_proxies"
340340
)
341341

342-
func IsExternalProxies(opt clibase.Option) bool {
342+
// IsWorkspaceProxies returns true if the cli option is used by workspace proxies.
343+
func IsWorkspaceProxies(opt clibase.Option) bool {
343344
// If it is a bool, use the bool value.
344345
b, _ := strconv.ParseBool(opt.Annotations[flagExternalProxies])
345346
return b

enterprise/cli/proxyserver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (r *RootCmd) proxyServer() *clibase.Cmd {
4747
var (
4848
cfg = new(codersdk.DeploymentValues)
4949
// Filter options for only relevant ones.
50-
opts = cfg.Options().Filter(codersdk.IsExternalProxies)
50+
opts = cfg.Options().Filter(codersdk.IsWorkspaceProxies)
5151

5252
externalProxyOptionGroup = clibase.Group{
5353
Name: "External Workspace Proxy",
@@ -84,7 +84,7 @@ func (r *RootCmd) proxyServer() *clibase.Cmd {
8484
Hidden: false,
8585
},
8686

87-
// TODO: Make sure this is kept secret. Idk if a flag is the best option
87+
// TODO: This will eventually be pulled over an authenticated api endpoint.
8888
clibase.Option{
8989
Name: "App Security Key",
9090
Description: "App security key used for decrypting/verifying app tokens sent from coderd.",

enterprise/cli/workspaceproxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func (r *RootCmd) workspaceProxy() *clibase.Cmd {
3232
func (r *RootCmd) deleteProxy() *clibase.Cmd {
3333
client := new(codersdk.Client)
3434
cmd := &clibase.Cmd{
35-
Use: "delete",
35+
Use: "delete <name|id>",
3636
Short: "Delete a workspace proxy",
3737
Middleware: clibase.Chain(
3838
clibase.RequireNArgs(1),

enterprise/wsproxy/wsproxy.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,10 @@ func (s *Server) DialWorkspaceAgent(id uuid.UUID) (*codersdk.WorkspaceAgentConn,
220220

221221
func (s *Server) buildInfo(rw http.ResponseWriter, r *http.Request) {
222222
httpapi.Write(r.Context(), rw, http.StatusOK, codersdk.BuildInfoResponse{
223-
ExternalURL: buildinfo.ExternalURL(),
224-
Version: buildinfo.Version(),
225-
DashboardURL: s.DashboardURL.String(),
223+
ExternalURL: buildinfo.ExternalURL(),
224+
Version: buildinfo.Version(),
225+
DashboardURL: s.DashboardURL.String(),
226+
WorkspaceProxy: true,
226227
})
227228
}
228229

site/src/api/typesGenerated.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ export interface DERPServerConfig {
319319
export interface DangerousConfig {
320320
readonly allow_path_app_sharing: boolean
321321
readonly allow_path_app_site_owner_access: boolean
322+
readonly dev_app_security_key: string
322323
}
323324

324325
// From codersdk/deployment.go

0 commit comments

Comments
 (0)