relay.AssumeValid can be passed as an option, so it works from a Pool.

This commit is contained in:
fiatjaf
2026-04-23 21:11:56 -03:00
parent b899ef8865
commit 744fb0702c
+4
View File
@@ -93,6 +93,7 @@ func NewRelay(ctx context.Context, url string, opts RelayOptions) *Relay {
noticeHandler: opts.NoticeHandler,
authHandler: opts.AuthHandler,
closed: &atomic.Bool{},
AssumeValid: opts.AssumeValid,
}
go func() {
@@ -147,6 +148,9 @@ type RelayOptions struct {
// RequestHeader sets the HTTP request header of the websocket preflight request
RequestHeader http.Header
// AssumeValid disables signature verification for events received from this relay
AssumeValid bool
}
// String just returns the relay URL.