Skip to content

Commit

Permalink
Update backfill package to use HTTP/HTTPS for getRepo always
Browse files Browse the repository at this point in the history
  • Loading branch information
ericvolp12 committed Dec 12, 2024
1 parent 5ee8937 commit cc407d9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions backfill/backfill.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit cc407d9

Please sign in to comment.