Skip to content

Commit e31486d

Browse files
committed
change static handler from m.Get to m.Any due to breaking compatibitily of routing order of martini
1 parent c7564f6 commit e31486d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

httpd.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ import (
1111

1212
"encoding/base64"
1313

14+
"path/filepath"
15+
1416
"github.com/go-martini/martini"
1517
"github.com/martini-contrib/oauth2"
1618
"github.com/martini-contrib/sessions"
17-
"path/filepath"
1819
)
1920

2021
type Server struct {
@@ -102,7 +103,7 @@ func (s *Server) Run() error {
102103

103104
log.Printf("starting static file server for: %s", path)
104105
fileServer := http.FileServer(http.Dir(path))
105-
m.Get("/**", fileServer.ServeHTTP)
106+
m.Any("/**", fileServer.ServeHTTP)
106107

107108
log.Printf("starting server at %s", s.Conf.Addr)
108109

0 commit comments

Comments
 (0)