apply sane defaults (i.e. rate-limit connections like crazy).

This commit is contained in:
fiatjaf 2024-07-08 09:09:06 -03:00
parent 3954e5a4ba
commit a78ab550c2
2 changed files with 3 additions and 1 deletions

2
go.mod
View File

@ -6,7 +6,7 @@ toolchain go1.21.6
require (
github.com/fiatjaf/eventstore v0.4.2
github.com/fiatjaf/khatru v0.4.2
github.com/fiatjaf/khatru v0.5.0
github.com/kelseyhightower/envconfig v1.4.0
github.com/nbd-wtf/go-nostr v0.30.0
github.com/nbd-wtf/nostr-sdk v0.1.0

View File

@ -69,6 +69,8 @@ func main() {
RestrictedWrites: true,
}
policies.ApplySaneDefaults(relay)
relay.StoreEvent = append(relay.StoreEvent, db.SaveEvent)
relay.QueryEvents = append(relay.QueryEvents, db.QueryEvents)
relay.DeleteEvent = append(relay.DeleteEvent, db.DeleteEvent)