Add logging middleware
This commit is contained in:
parent
9fe79d3f43
commit
3bbeab1199
1 changed files with 2 additions and 0 deletions
|
|
@ -21,6 +21,8 @@ func NewServer(conf *koanf.Koanf, pool *pgxpool.Pool) *echo.Echo {
|
||||||
func addMiddleware(s *echo.Echo, conf *koanf.Koanf) {
|
func addMiddleware(s *echo.Echo, conf *koanf.Koanf) {
|
||||||
s.Use(middleware.CORS())
|
s.Use(middleware.CORS())
|
||||||
|
|
||||||
|
s.Use(middleware.Logger())
|
||||||
|
|
||||||
s.Use(middleware.JWTWithConfig(middleware.JWTConfig{
|
s.Use(middleware.JWTWithConfig(middleware.JWTConfig{
|
||||||
Skipper: func(ctx echo.Context) bool {
|
Skipper: func(ctx echo.Context) bool {
|
||||||
return ctx.Request().Method == "GET" && ctx.Request().URL.Path != "/links"
|
return ctx.Request().Method == "GET" && ctx.Request().URL.Path != "/links"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue