Skip to content

Commit

Permalink
routers: recover from panics on handler threads
Browse files Browse the repository at this point in the history
  • Loading branch information
Starz0r committed Nov 28, 2020
1 parent 31c467c commit f985626
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module github.com/orchestrafm/tracks

go 1.12.17

require (
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/go-sql-driver/mysql v1.4.1
Expand All @@ -11,5 +13,5 @@ require (
github.com/spidernest-go/db v0.0.0-20190526235030-072cabf93805
github.com/spidernest-go/logger v0.0.0-20191128190838-520d89ea00af
github.com/spidernest-go/migrate v0.0.0-20190604214622-8fccd3022231
github.com/spidernest-go/mux v0.0.0-20200202234537-1b58c269dc0a
github.com/spidernest-go/mux v0.0.0-20201128044825-fb21d0a8ad81
)
2 changes: 1 addition & 1 deletion src/routers/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func ListenAndServe() error {
AllowOrigins: []string{"*"},
AllowMethods: []string{http.MethodGet, http.MethodHead, http.MethodPut, http.MethodPatch, http.MethodPost, http.MethodDelete},
AllowHeaders: []string{echo.HeaderOrigin, echo.HeaderContentType, echo.HeaderAccept},
}))
}), middleware.Recover())

v0 := r.Group("/api/v0")
v0AuthReq := v0.Group("", middleware.JWTWithConfig(middleware.JWTConfig{
Expand Down

0 comments on commit f985626

Please sign in to comment.