diff options
author | Nick Thomas <nick@gitlab.com> | 2019-09-13 18:46:52 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-09-13 18:46:52 +0300 |
commit | fc8f04d5fef6d36568f751e0ebb724a22959cb96 (patch) | |
tree | 4e80184def1dd2cca60c5cc2cd191fe9681bda9d /app.go | |
parent | 75d00b984b3edd2832f28a1fa397bd7ad9e4bbbd (diff) | |
parent | 1198f4ee2f3f216cde7b318505f7ebdfe8d7e338 (diff) |
Merge branch 'backstage/gb/rename-confusig-domain-struct' into 'master'1-9-stable
Rename confusing domain struct
See merge request gitlab-org/gitlab-pages!184
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -59,7 +59,7 @@ func (a *theApp) isReady() bool { return a.dm != nil } -func (a *theApp) domain(host string) *domain.D { +func (a *theApp) domain(host string) *domain.Domain { host = strings.ToLower(host) a.lock.RLock() defer a.lock.RUnlock() @@ -97,7 +97,7 @@ func (a *theApp) redirectToHTTPS(w http.ResponseWriter, r *http.Request, statusC http.Redirect(w, r, u.String(), statusCode) } -func (a *theApp) getHostAndDomain(r *http.Request) (host string, domain *domain.D) { +func (a *theApp) getHostAndDomain(r *http.Request) (host string, domain *domain.Domain) { host, _, err := net.SplitHostPort(r.Host) if err != nil { host = r.Host @@ -106,7 +106,7 @@ func (a *theApp) getHostAndDomain(r *http.Request) (host string, domain *domain. return host, a.domain(host) } -func (a *theApp) checkAuthenticationIfNotExists(domain *domain.D, w http.ResponseWriter, r *http.Request) bool { +func (a *theApp) checkAuthenticationIfNotExists(domain *domain.Domain, w http.ResponseWriter, r *http.Request) bool { if domain == nil || !domain.HasProject(r) { // Only if auth is supported @@ -132,7 +132,7 @@ func (a *theApp) checkAuthenticationIfNotExists(domain *domain.D, w http.Respons return false } -func (a *theApp) tryAuxiliaryHandlers(w http.ResponseWriter, r *http.Request, https bool, host string, domain *domain.D) bool { +func (a *theApp) tryAuxiliaryHandlers(w http.ResponseWriter, r *http.Request, https bool, host string, domain *domain.Domain) bool { // short circuit content serving to check for a status page if r.RequestURI == a.appConfig.StatusPath { a.healthCheck(w, r, https) |