mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
chore: Add workspace proxy enterprise cli commands (#7176)
* feat: Add workspace proxy enterprise cli commands * chore: Handle custom workspace proxy options. Remove excess * chore: Add endpoint to register workspace proxies
This commit is contained in:
@ -15,15 +15,12 @@ INSERT INTO
|
||||
VALUES
|
||||
($1, $2, $3, $4, $5, $6, $7, $8, $9, false) RETURNING *;
|
||||
|
||||
-- name: UpdateWorkspaceProxy :one
|
||||
-- name: RegisterWorkspaceProxy :one
|
||||
UPDATE
|
||||
workspace_proxies
|
||||
SET
|
||||
name = @name,
|
||||
display_name = @display_name,
|
||||
url = @url,
|
||||
wildcard_hostname = @wildcard_hostname,
|
||||
icon = @icon,
|
||||
updated_at = Now()
|
||||
WHERE
|
||||
id = @id
|
||||
@ -49,6 +46,17 @@ WHERE
|
||||
LIMIT
|
||||
1;
|
||||
|
||||
-- name: GetWorkspaceProxyByName :one
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
workspace_proxies
|
||||
WHERE
|
||||
name = $1
|
||||
AND deleted = false
|
||||
LIMIT
|
||||
1;
|
||||
|
||||
-- Finds a workspace proxy that has an access URL or app hostname that matches
|
||||
-- the provided hostname. This is to check if a hostname matches any workspace
|
||||
-- proxy.
|
||||
|
Reference in New Issue
Block a user