mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: support nested structs, structured arrays, and better secret value handling in config (#4727)
This commit is contained in:
@@ -26,8 +26,8 @@ import (
|
||||
func server() *cobra.Command {
|
||||
vip := deployment.NewViper()
|
||||
cmd := agpl.Server(vip, func(ctx context.Context, options *agplcoderd.Options) (*agplcoderd.API, io.Closer, error) {
|
||||
if options.DeploymentConfig.DERPServerRelayURL.Value != "" {
|
||||
_, err := url.Parse(options.DeploymentConfig.DERPServerRelayURL.Value)
|
||||
if options.DeploymentConfig.DERP.Server.RelayURL.Value != "" {
|
||||
_, err := url.Parse(options.DeploymentConfig.DERP.Server.RelayURL.Value)
|
||||
if err != nil {
|
||||
return nil, nil, xerrors.Errorf("derp-server-relay-address must be a valid HTTP URL: %w", err)
|
||||
}
|
||||
@@ -63,8 +63,8 @@ func server() *cobra.Command {
|
||||
SCIMAPIKey: []byte(options.DeploymentConfig.SCIMAPIKey.Value),
|
||||
UserWorkspaceQuota: options.DeploymentConfig.UserWorkspaceQuota.Value,
|
||||
RBAC: true,
|
||||
DERPServerRelayAddress: options.DeploymentConfig.DERPServerRelayURL.Value,
|
||||
DERPServerRegionID: options.DeploymentConfig.DERPServerRegionID.Value,
|
||||
DERPServerRelayAddress: options.DeploymentConfig.DERP.Server.RelayURL.Value,
|
||||
DERPServerRegionID: options.DeploymentConfig.DERP.Server.RegionID.Value,
|
||||
|
||||
Options: options,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user