Skip to content

Commit

Permalink
Merge pull request #14 from SwanHubX/fix
Browse files Browse the repository at this point in the history
fix: empty key
  • Loading branch information
swpfY authored Nov 24, 2023
2 parents 1b34dc5 + 9a93bd2 commit d7ff969
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion preprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ type JWT struct {
}

func New(ctx context.Context, next http.Handler, config *Config, name string) (http.Handler, error) {
publicKey := loadPublicKey(config.Key) // 加载pem公钥
var publicKey *rsa.PublicKey = nil
if config.Key != "" {
publicKey = loadPublicKey(config.Key) // 加载pem公钥
}
return &Preprocess{
next: next,
name: name,
Expand Down

0 comments on commit d7ff969

Please sign in to comment.