mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-20 16:01:36 +02:00
disabled auth by default (when no JWT secret is specified)
This commit is contained in:
@@ -23,6 +23,9 @@ func generateJWTKey(size int) string {
|
||||
}
|
||||
|
||||
func decodeJWTKey(key string) []byte {
|
||||
if key == "" {
|
||||
return nil
|
||||
}
|
||||
bytes, err := base64.StdEncoding.DecodeString(key)
|
||||
if err != nil {
|
||||
log.Panic().Err(err).Msg("failed to decode jwt key")
|
||||
|
||||
Reference in New Issue
Block a user