Moge-Row commited on
Commit
6c5c62f
·
1 Parent(s): b1c52b8

allow JWT keys to bypass validation

Browse files
Files changed (1) hide show
  1. internal/handler/keys.go +3 -3
internal/handler/keys.go CHANGED
@@ -62,9 +62,9 @@ func TrackUsage(k string, t int) {
62
  }
63
 
64
  func CheckAndTrack(k string, t int) (bool, string) {
65
- if k == "free" {
66
- return true, ""
67
- }
68
  s.mu.Lock()
69
  defer s.mu.Unlock()
70
  for _, kd := range s.Keys {
 
62
  }
63
 
64
  func CheckAndTrack(k string, t int) (bool, string) {
65
+ if strings.HasPrefix(k, "eyJ") {
66
+ return true, ""
67
+ }
68
  s.mu.Lock()
69
  defer s.mu.Unlock()
70
  for _, kd := range s.Keys {