diff options
| -rw-r--r-- | roseh.moe.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/roseh.moe.go b/roseh.moe.go index 5f24664..ecc4b50 100644 --- a/roseh.moe.go +++ b/roseh.moe.go @@ -53,6 +53,7 @@ var ( nezuko = flag.String("nezuko", "/mnt/nezuko", "nezuko partition") cgit = flag.String("cgit", "", "directory containing cgit.cgi") cgitConfig = flag.String("cgit-config", "", "cgit config file") + v = flag.Bool("v", true, "verbose") ) type urlValue struct { @@ -1212,8 +1213,12 @@ func main() { cgitCGI.PathLocationHandler = cgitCGI codeMux.Handle("/", &timeoutHandler{h: cgitCGI, timeout: 5 * time.Minute}) serverMux.Handle("code."+selfURL.Hostname()+"/", &gzipHandler{codeMux}) + var handler http.Handler = serverMux + if *v { + handler = &loggingHandler{serverMux} + } server := &http.Server{ - Handler: &loggingHandler{serverMux}, + Handler: handler, ReadHeaderTimeout: 5 * time.Minute, IdleTimeout: 10 * time.Minute, |
