Skip to content

Commit 2e24104

Browse files
authored
Support subdomain
1 parent dae528f commit 2e24104

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coderd/httpapi/url.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var (
1515
nameRegex = strings.Trim(UsernameValidRegex.String(), "^$")
1616
appURL = regexp.MustCompile(fmt.Sprintf(
1717
// {PORT/APP_SLUG}--{AGENT_NAME}--{WORKSPACE_NAME}--{USERNAME}
18-
`^(?P<AppSlug>%[1]s)--(?P<AgentName>%[1]s)--(?P<WorkspaceName>%[1]s)--(?P<Username>%[1]s)$`,
18+
`^(?:%[1]s\.)?(?P<AppSlug>%[1]s)--(?P<AgentName>%[1]s)--(?P<WorkspaceName>%[1]s)--(?P<Username>%[1]s)$`,
1919
nameRegex))
2020

2121
validHostnameLabelRegex = regexp.MustCompile(`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`)

0 commit comments

Comments
 (0)