Skip to content

Commit

Permalink
Refactor initialization of server (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtlynch committed Aug 19, 2022
1 parent 7076c87 commit b40a560
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/logpaste/main.go
Expand Up @@ -28,15 +28,13 @@ func main() {

flag.Parse()

s := handlers.New(handlers.SiteProperties{
h := gorilla.LoggingHandler(os.Stdout, handlers.New(handlers.SiteProperties{
Title: *title,
Subtitle: *subtitle,
FooterHTML: *footer,
DarkMode: *darkMode,
ShowDocs: *showDocs,
}, *perMinuteLimit)

h := gorilla.LoggingHandler(os.Stdout, s.Router())
}, *perMinuteLimit).Router())
if os.Getenv("PS_BEHIND_PROXY") != "" {
h = gorilla.ProxyIPHeadersHandler(h)
}
Expand Down

0 comments on commit b40a560

Please sign in to comment.