mirror of
https://github.com/livekit/livekit.git
synced 2026-05-15 03:05:26 +00:00
ensure keys are not empty
This commit is contained in:
+3
-3
@@ -262,11 +262,11 @@ func createKeyProvider(conf *config.Config) (auth.KeyProvider, error) {
|
||||
return auth.NewFileBasedKeyProviderFromReader(f)
|
||||
}
|
||||
|
||||
if conf.Keys != nil {
|
||||
return auth.NewFileBasedKeyProviderFromMap(conf.Keys), nil
|
||||
if len(conf.Keys) == 0 {
|
||||
return nil, errors.New("one of key-file or keys must be provided in order to support a secure installation")
|
||||
}
|
||||
|
||||
return nil, errors.New("one of key-file or keys must be provided in order to support a secure installation")
|
||||
return auth.NewFileBasedKeyProviderFromMap(conf.Keys), nil
|
||||
}
|
||||
|
||||
func getConfigString(c *cli.Context) (string, error) {
|
||||
|
||||
Reference in New Issue
Block a user