Skip to content

Commit

Permalink
Merge pull request #56 from OOrangeeee/online/deploy-debug
Browse files Browse the repository at this point in the history
Online/deploy debug
  • Loading branch information
OOrangeeee authored Oct 14, 2024
2 parents c5cbed9 + 73d504d commit c2d9c7f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/configs/middlewareConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
"github.com/sirupsen/logrus"
"github.com/spf13/viper"
"net/http"
"os"
"path/filepath"
Expand Down Expand Up @@ -79,7 +80,9 @@ func InitMiddleware(e *echo.Echo, jwtSecret string) {
}
return false
},
SigningKey: []byte(jwtSecret),
SigningKey: func() []byte {
return []byte(viper.GetString("jwt.jwtSecret"))
}(),
TokenLookup: "header:Authorization:Bearer ",
ErrorHandler: func(c echo.Context, err error) error {
utils.Log.WithFields(logrus.Fields{
Expand Down

0 comments on commit c2d9c7f

Please sign in to comment.