diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-02-11 21:24:45 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-02-11 21:24:45 +0300 |
commit | 3d691bf42432304a3ae6d6465c3f596629891e74 (patch) | |
tree | b37d38ccf1a672a4c862f53b4534e07db5122091 /app.go | |
parent | 3824fc8ca34b8f94ae7ef7550aec196dbbfdecf5 (diff) |
Move most of configuration to appConfig
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -44,7 +44,7 @@ func (a *theApp) serveContent(ww http.ResponseWriter, r *http.Request, https boo defer w.Log(r) // Add auto redirect - if https && !*serverHTTP { + if https && !a.RedirectHTTP { u := *r.URL u.Scheme = "https" u.Host = r.Host @@ -89,7 +89,7 @@ func (a *theApp) Run() { wg.Add(1) go func() { defer wg.Done() - err := listenAndServe(a.ListenHTTP, a.ServeHTTP, nil) + err := listenAndServe(a.ListenHTTP, a.ServeHTTP, a.HTTP2, nil) if err != nil { log.Fatal(err) } @@ -101,7 +101,7 @@ func (a *theApp) Run() { wg.Add(1) go func() { defer wg.Done() - err := listenAndServeTLS(a.ListenHTTPS, a.RootCertificate, a.RootKey, a.ServeHTTP, a.ServeTLS) + err := listenAndServeTLS(a.ListenHTTPS, a.RootCertificate, a.RootKey, a.ServeHTTP, a.ServeTLS, a.HTTP2) if err != nil { log.Fatal(err) } @@ -113,7 +113,7 @@ func (a *theApp) Run() { wg.Add(1) go func() { defer wg.Done() - err := listenAndServe(a.listenProxy, a.ServeProxy, nil) + err := listenAndServe(a.listenProxy, a.ServeProxy, a.HTTP2, nil) if err != nil { log.Fatal(err) } |