diff --git a/backfill/backfill.go b/backfill/backfill.go index 9232fa9f0..8d1a146b2 100644 --- a/backfill/backfill.go +++ b/backfill/backfill.go @@ -140,6 +140,14 @@ func NewBackfiller( if opts == nil { opts = DefaultBackfillOptions() } + + // Convert wss:// or ws:// to https:// or http:// + if strings.HasPrefix(opts.RelayHost, "wss://") { + opts.RelayHost = "https://" + opts.RelayHost[6:] + } else if strings.HasPrefix(opts.RelayHost, "ws://") { + opts.RelayHost = "http://" + opts.RelayHost[5:] + } + return &Backfiller{ Name: name, Store: store,