Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-03-13 22:35:31 +0300
committerNick Thomas <nick@gitlab.com>2018-03-13 22:35:31 +0300
commit7d9ea1897c38f02b0304516afb9dce8ad08b9ca4 (patch)
tree7b461625a225dca3655d84704c282abe49e8d16c
parenta38e722ca89b17cfe339c3f29e764e25df565841 (diff)
parent5a37d0e959cdd4eb97e153b4d2598d4efa30dded (diff)
Merge branch 'sh-fix-pages-nil' into 'master'
Fix nil reference error when project is not in config.json Closes gitlab-com/infrastructure#3848 See merge request gitlab-org/gitlab-pages!70
-rw-r--r--domain.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/domain.go b/domain.go
index 9804321f..2d562d04 100644
--- a/domain.go
+++ b/domain.go
@@ -103,7 +103,12 @@ func (d *domain) isHTTPSOnly(r *http.Request) bool {
}
project := d.Projects[split[1]]
- return project.HTTPSOnly
+
+ if project != nil {
+ return project.HTTPSOnly
+ }
+
+ return false
}
func (d *domain) serveFile(w http.ResponseWriter, r *http.Request, origPath string) error {