8000 chore: move app URL parsing to its own package by Emyrk · Pull Request #11651 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

chore: move app URL parsing to its own package #11651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
linting
  • Loading branch information
Emyrk committed Jan 16, 2024
commit 8de23629cdf586c357f60d69b573c8102dbfbaa2
1 change: 0 additions & 1 deletion cli/clibase/yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ func (optSet *OptionSet) MarshalYAML() (any, error) {
}

_, isValidator := opt.Value.(interface{ IsValidator() })

var valueNode yaml.Node
if opt.Value == nil {
valueNode = yaml.Node{
Expand Down
15 changes: 7 additions & 8 deletions cli/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ import (
"gopkg.in/yaml.v3"
"tailscale.com/tailcfg"

"github.com/coder/coder/v2/coderd/workspaceapps/appurl"
"github.com/coder/pretty"

"cdr.dev/slog"
"cdr.dev/slog/sloggers/sloghuman"
"github.com/coder/coder/v2/buildinfo"
Expand Down Expand Up @@ -89,6 +86,7 @@ import (
"github.com/coder/coder/v2/coderd/util/slice"
stringutil "github.com/coder/coder/v2/coderd/util/strings"
"github.com/coder/coder/v2/coderd/workspaceapps"
"github.com/coder/coder/v2/coderd/workspaceapps/appurl"
"github.com/coder/coder/v2/codersdk"
"github.com/coder/coder/v2/codersdk/drpc"
"github.com/coder/coder/v2/cryptorand"
Expand All @@ -99,6 +97,7 @@ import (
"github.com/coder/coder/v2/provisionersdk"
sdkproto "github.com/coder/coder/v2/provisionersdk/proto"
"github.com/coder/coder/v2/tailnet"
"github.com/coder/pretty"
"github.com/coder/retry"
"github.com/coder/wgtunnel/tunnelsdk"
)
Expand Down Expand Up @@ -434,11 +433,11 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.

if vals.WildcardAccessURL.String() == "" {
// Suffixed wildcard access URL.
//u, err := url.Parse(fmt.Sprintf("*--%s", tunnel.URL.Hostname()))
//if err != nil {
// return xerrors.Errorf("parse wildcard url: %w", err)
//}
vals.WildcardAccessURL.Set(fmt.Sprintf("*--%s", tunnel.URL.Hostname()))
wu := fmt.Sprintf("*--%s", tunnel.URL.Hostname())
err = vals.WildcardAccessURL.Set(wu)
if err != nil {
return xerrors.Errorf("set wildcard access url %q: %w", wu, err)
}
}
}

Expand Down
0