From cc407d9025aadb5a489a9a5c4d82b070929b9f72 Mon Sep 17 00:00:00 2001 From: Jaz Volpert Date: Thu, 12 Dec 2024 18:47:38 +0000 Subject: [PATCH] Update backfill package to use HTTP/HTTPS for getRepo always --- backfill/backfill.go | 8 ++++++++ 1 file changed, 8 insertions(+) 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,