Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite291e8c

Browse files
committed
rename
1 parentc623e5b commite291e8c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

‎coderd/tailnet.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,16 +369,16 @@ func (s *ServerTailnet) ReverseProxy(targetURL, dashboardURL *url.URL, agentID u
369369
Scheme:dashboardURL.Scheme,
370370
}
371371
ifapp.IsPort() {
372-
ifapp.Protocol()=="https" {
372+
ifapp.PortProtocol()=="https" {
373373
app.ChangePortProtocol("http")
374374
}else {
375375
app.ChangePortProtocol("https")
376376
}
377377

378378
switchURL.Host=fmt.Sprintf("%s%s",app.String(),strings.TrimPrefix(wildcardHostname,"*"))
379379
switchLink=switchURL.String()
380-
switchTarget=app.Protocol()
381-
additional+=fmt.Sprintf("This error seems to be due to an app protocol mismatch, try switching to %s.",strings.ToUpper(app.Protocol()))
380+
switchTarget=app.PortProtocol()
381+
additional+=fmt.Sprintf("This error seems to be due to an app protocol mismatch, try switching to %s.",strings.ToUpper(app.PortProtocol()))
382382
}
383383
}
384384

‎coderd/workspaceapps/appurl/appurl.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func (a ApplicationURL) IsPort() bool {
107107
returntrue
108108
}
109109

110-
func (aApplicationURL)Protocol()string {
110+
func (aApplicationURL)PortProtocol()string {
111111
ifstrings.HasSuffix(a.AppSlugOrPort,"s") {
112112
trimmed:=strings.TrimSuffix(a.AppSlugOrPort,"s")
113113
_,err:=strconv.ParseInt(trimmed,10,64)
@@ -121,7 +121,7 @@ func (a ApplicationURL) Protocol() string {
121121

122122
func (a*ApplicationURL)ChangePortProtocol(targetstring) {
123123
iftarget=="http" {
124-
ifa.Protocol()=="http" {
124+
ifa.PortProtocol()=="http" {
125125
return
126126
}
127127
trimmed:=strings.TrimSuffix(a.AppSlugOrPort,"s")
@@ -132,7 +132,7 @@ func (a *ApplicationURL) ChangePortProtocol(target string) {
132132
}
133133

134134
iftarget=="https" {
135-
ifa.Protocol()=="https" {
135+
ifa.PortProtocol()=="https" {
136136
return
137137
}
138138
_,err:=strconv.ParseInt(a.AppSlugOrPort,10,64)

‎coderd/workspaceapps/proxy.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ func (s *Server) proxyWorkspaceApp(rw http.ResponseWriter, r *http.Request, appT
546546
r.URL.Path=path
547547
appURL.RawQuery=""
548548
ifapp.IsPort() {
549-
appURL.Scheme=app.Protocol()
549+
appURL.Scheme=app.PortProtocol()
550550
}
551551

552552
proxy:=s.AgentProvider.ReverseProxy(appURL,s.DashboardURL,appToken.AgentID,app,s.Hostname)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp