reasonable limits, upgrade khatru to latest

This commit is contained in:
Barry Deen 2024-09-11 22:06:17 -04:00
parent af155c1f48
commit 5d27b71860
3 changed files with 8 additions and 1 deletions

2
go.mod
View File

@ -18,7 +18,7 @@ require (
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fasthttp/websocket v1.5.7 // indirect
github.com/fiatjaf/eventstore v0.8.2 // indirect
github.com/fiatjaf/khatru v0.8.0 // indirect
github.com/fiatjaf/khatru v0.8.2-0.20240912020201-6d827ac89ae6 // indirect
github.com/gobwas/httphead v0.1.0 // indirect
github.com/gobwas/pool v0.2.1 // indirect
github.com/gobwas/ws v1.4.0 // indirect

4
go.sum
View File

@ -53,6 +53,10 @@ github.com/fiatjaf/eventstore v0.8.2 h1:nCa3UuJNV5Y5t+SDoPQe7PBmKJ6dhm9TQ/WyR4SC
github.com/fiatjaf/eventstore v0.8.2/go.mod h1:ck3RxufitHUBjID1RLcRxfX+NMywQzMsdfNpSt6m+9U=
github.com/fiatjaf/khatru v0.8.0 h1:hofUi4qbSqkJiKD4rC9EyNdi9obzBvp3ykJOBxuu/h8=
github.com/fiatjaf/khatru v0.8.0/go.mod h1:jRmqbbIbEH+y0unt3wMUBwqY/btVussqx5SmBoGhXtg=
github.com/fiatjaf/khatru v0.8.1 h1:BWAZqwuT0272ZlyzPkuqAA0eGBOs5G3u0Dn1tlWrm6Q=
github.com/fiatjaf/khatru v0.8.1/go.mod h1:jRmqbbIbEH+y0unt3wMUBwqY/btVussqx5SmBoGhXtg=
github.com/fiatjaf/khatru v0.8.2-0.20240912020201-6d827ac89ae6 h1:Ad1Z2+CM0zbp405rcZDaaXMemLDKZkm/Z+f+RrjmXdU=
github.com/fiatjaf/khatru v0.8.2-0.20240912020201-6d827ac89ae6/go.mod h1:jRmqbbIbEH+y0unt3wMUBwqY/btVussqx5SmBoGhXtg=
github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU=
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=

View File

@ -14,6 +14,7 @@ import (
"github.com/cespare/xxhash"
"github.com/fiatjaf/khatru"
"github.com/fiatjaf/khatru/policies"
"github.com/greatroar/blobloom"
"github.com/joho/godotenv"
"github.com/nbd-wtf/go-nostr"
@ -78,6 +79,8 @@ func main() {
panic(err)
}
policies.ApplySaneDefaults(relay)
relay.StoreEvent = append(relay.StoreEvent, db.SaveEvent)
relay.QueryEvents = append(relay.QueryEvents, db.QueryEvents)
relay.DeleteEvent = append(relay.DeleteEvent, db.DeleteEvent)