Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
user-agent based on version number #74
Browse files Browse the repository at this point in the history
  • Loading branch information
lspgn committed Nov 14, 2020
1 parent 6c1872d commit 5246d51
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/octorpki/octorpki.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ var (
RRDP = flag.Bool("rrdp", true, "Enable RRDP fetching")
RRDPFile = flag.String("rrdp.file", "cache/rrdp.json", "Save RRDP state")
RRDPFailover = flag.Bool("rrdp.failover", true, "Failover to rsync when RRDP fails")
UserAgent = flag.String("useragent", fmt.Sprintf("Cloudflare-RRDP-%v (+https://github.com/cloudflare/cfrpki)", AppVersion), "User-Agent header")

Mode = flag.String("mode", "server", "Select output mode (server/oneoff)")
WaitStable = flag.Bool("output.wait", true, "Wait until stable state to create the file (returns 503 when unstable on HTTP)")
Expand Down Expand Up @@ -1233,7 +1234,7 @@ func main() {
},
log.StandardLogger()),
HTTPFetcher: &syncpki.HTTPFetcher{
UserAgent: "Cloudflare-RPKI-RRDP/1.0 (+https://rpki.cloudflare.com)",
UserAgent: *UserAgent,
Client: &http.Client{},
},
ROAList: &prefixfile.ROAList{
Expand Down

0 comments on commit 5246d51

Please sign in to comment.