relay.AssumeValid can be passed as an option, so it works from a Pool.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user