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:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-02-11 21:24:45 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-02-11 21:24:45 +0300
commit3d691bf42432304a3ae6d6465c3f596629891e74 (patch)
treeb37d38ccf1a672a4c862f53b4534e07db5122091 /main.go
parent3824fc8ca34b8f94ae7ef7550aec196dbbfdecf5 (diff)
Move most of configuration to appConfig
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.go b/main.go
index 5799f380..05d2654d 100644
--- a/main.go
+++ b/main.go
@@ -16,8 +16,6 @@ var VERSION = "dev"
var REVISION = "HEAD"
var pagesDomain = flag.String("pages-domain", "gitlab-example.com", "The domain to serve static pages")
-var serverHTTP = flag.Bool("serve-http", true, "Serve the pages under HTTP")
-var http2proto = flag.Bool("http2", true, "Enable HTTP2 support")
var pagesRoot = flag.String("pages-root", "shared/pages", "The directory where pages are stored")
func evalSymlinks(directory string) (result string) {
@@ -57,6 +55,8 @@ func main() {
var listenProxy = flag.String("listen-proxy", "", "The address to listen for proxy requests")
var pagesRootCert = flag.String("root-cert", "", "The default path to file certificate to serve static pages")
var pagesRootKey = flag.String("root-key", "", "The default path to file certificate to serve static pages")
+ var redirectHTTP = flag.Bool("redirect-http", true, "Serve the pages under HTTP")
+ var useHTTP2 = flag.Bool("use-http2", true, "Enable HTTP2 support")
fmt.Printf("GitLab Pages Daemon %s (%s)", VERSION, REVISION)
fmt.Printf("URL: https://gitlab.com/gitlab-org/gitlab-pages")
@@ -66,6 +66,8 @@ func main() {
app.Domain = *pagesDomain
app.RootDir = evalSymlinks(*pagesRoot)
+ app.RedirectHTTP = *redirectHTTP
+ app.HTTP2 = *useHTTP2
if *pagesRootCert != "" {
app.RootCertificate = readFile(*pagesRootCert)