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:
authorRob Watson <rob@mixlr.com>2018-01-03 23:02:46 +0300
committerRob Watson <rob@mixlr.com>2018-03-06 21:06:11 +0300
commit00b6c5f315ac00e9da8a6de99c50b064e9f87872 (patch)
tree000051186e3a2e820a25b9e4b3157ba83d9af13f /domain_config.go
parenta638665f6c6eacd6aad74c855f0f6441c09ca029 (diff)
Implement HTTPS-only pages
- Check `config.json` for `httpsonly` attribute - Store value against custom domain or group/project pair - Respond with 301 redirect to HTTP requests to these domains/projects Re: https://gitlab.com/gitlab-org/gitlab-ce/issues/28857
Diffstat (limited to 'domain_config.go')
-rw-r--r--domain_config.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/domain_config.go b/domain_config.go
index e0f00cc4..f5c3db79 100644
--- a/domain_config.go
+++ b/domain_config.go
@@ -11,10 +11,12 @@ type domainConfig struct {
Domain string
Certificate string
Key string
+ HTTPSOnly bool `json:"https_only"`
}
type domainsConfig struct {
- Domains []domainConfig
+ Domains []domainConfig
+ HTTPSOnly bool `json:"https_only"`
}
func (c *domainConfig) Valid(rootDomain string) bool {