diff --git a/cmd/mothd/httpd.go b/cmd/mothd/httpd.go index b2315db..26faf4f 100644 --- a/cmd/mothd/httpd.go +++ b/cmd/mothd/httpd.go @@ -21,6 +21,7 @@ func NewHTTPServer(base string, theme ThemeProvider, state StateProvider, puzzle PuzzleProvider: puzzles, ServeMux: http.NewServeMux(), } + base = strings.TrimRight(base, "/") h.HandleFunc(base+"/", h.ThemeHandler) h.HandleFunc(base+"/state", h.StateHandler) h.HandleFunc(base+"/register", h.RegisterHandler) diff --git a/cmd/mothd/theme.go b/cmd/mothd/theme.go index c1d728b..afb7e7e 100644 --- a/cmd/mothd/theme.go +++ b/cmd/mothd/theme.go @@ -3,7 +3,6 @@ package main import ( "github.com/spf13/afero" "time" - "log" ) type Theme struct { @@ -18,7 +17,6 @@ func NewTheme(fs afero.Fs) *Theme { // I don't understand why I need this. The type checking system is weird here. func (t *Theme) Open(name string) (ReadSeekCloser, error) { - log.Println(name) return t.Fs.Open(name) }