mirror of
https://github.com/fiatjaf/nak.git
synced 2026-02-06 16:54:33 +00:00
bunker: fix authorizing pubkeys from --authorized-secrets.
closes https://github.com/fiatjaf/nak/issues/102
This commit is contained in:
@@ -418,6 +418,13 @@ var bunker = &cli.Command{
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if slices.Contains(authorizedSecrets, secret) {
|
if slices.Contains(authorizedSecrets, secret) {
|
||||||
|
// add client to authorized list for subsequent requests
|
||||||
|
if !slices.ContainsFunc(config.Clients, func(c BunkerConfigClient) bool { return c.PubKey == from }) {
|
||||||
|
config.Clients = append(config.Clients, BunkerConfigClient{PubKey: from})
|
||||||
|
if persist != nil {
|
||||||
|
persist()
|
||||||
|
}
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user