Skip to content

Commit

Permalink
Update backfill package to use HTTP/HTTPS for getRepo always (#875)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericvolp12 authored Dec 12, 2024
2 parents 5ee8937 + cc407d9 commit 749cc07
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 749cc07

Please sign in to comment.