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

Commitb5d1f6a

Browse files
committed
Move to workspaceapps.go
1 parent4696bf9 commitb5d1f6a

File tree

5 files changed

+253
-271
lines changed

5 files changed

+253
-271
lines changed

‎coderd/httpapi/host.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package httpapi
2+
3+
import"net/http"
4+
5+
const (
6+
// XForwardedHostHeader is a header used by proxies to indicate the
7+
// original host of the request.
8+
XForwardedHostHeader="X-Forwarded-Host"
9+
)
10+
11+
// RequestHost returns the name of the host from the request. It prioritizes
12+
// 'X-Forwarded-Host' over r.Host since most requests are being proxied.
13+
funcRequestHost(r*http.Request)string {
14+
host:=r.Header.Get(XForwardedHostHeader)
15+
ifhost!="" {
16+
returnhost
17+
}
18+
19+
returnr.Host
20+
}

‎coderd/subdomain.go

Lines changed: 0 additions & 155 deletions
This file was deleted.

‎coderd/subdomain_test.go

Lines changed: 0 additions & 116 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp