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:46:23 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-02-11 21:46:23 +0300
commitfbf2a3f06dea7ac2468c6d027518fc62b642bef0 (patch)
tree88e29e92b70bfbc0b06d164b4a7d163f348dbac2 /main.go
parent944e6bbde62c266aa3d50f0943a2716ac8d5df4b (diff)
If URL doesn't end with /, redirect the client
Diffstat (limited to 'main.go')
-rw-r--r--main.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/main.go b/main.go
index 1d8d24cb..e7cadcce 100644
--- a/main.go
+++ b/main.go
@@ -59,8 +59,8 @@ func main() {
var pagesRoot = flag.String("pages-root", "shared/pages", "The directory where pages are stored")
var pagesDomain = flag.String("pages-domain", "gitlab-example.com", "The domain to serve static pages")
- fmt.Printf("GitLab Pages Daemon %s (%s)", VERSION, REVISION)
- fmt.Printf("URL: https://gitlab.com/gitlab-org/gitlab-pages")
+ fmt.Printf("GitLab Pages Daemon %s (%s)\n", VERSION, REVISION)
+ fmt.Printf("URL: https://gitlab.com/gitlab-org/gitlab-pages\n")
flag.Parse()
err := os.Chdir(*pagesRoot)
@@ -69,7 +69,6 @@ func main() {
}
var app theApp
-
app.Domain = strings.ToLower(*pagesDomain)
app.RedirectHTTP = *redirectHTTP
app.HTTP2 = *useHTTP2
@@ -99,4 +98,6 @@ func main() {
l, app.ListenHTTPS = createSocket(*listenProxy)
defer l.Close()
}
+
+ app.Run()
}