diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-02-11 21:46:23 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-02-11 21:46:23 +0300 |
commit | fbf2a3f06dea7ac2468c6d027518fc62b642bef0 (patch) | |
tree | 88e29e92b70bfbc0b06d164b4a7d163f348dbac2 /main.go | |
parent | 944e6bbde62c266aa3d50f0943a2716ac8d5df4b (diff) |
If URL doesn't end with /, redirect the client
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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() } |