From 280f09d28793cbf688cedeb9ef197da6673248ad Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sat, 11 Jan 2020 15:28:46 -0500 Subject: [PATCH] cmd/mi: use user agent --- cmd/mi/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/mi/main.go b/cmd/mi/main.go index 0376cdb..0d05894 100644 --- a/cmd/mi/main.go +++ b/cmd/mi/main.go @@ -15,6 +15,7 @@ import ( r "gopkg.in/rethinkdb/rethinkdb-go.v6" "within.website/ln" "within.website/ln/ex" + "within.website/x/web/useragent" ) var ( @@ -34,13 +35,16 @@ var ( blogURL = flag.String("blog-url", "https://christine.website/blog.json", "JSONFeed to monitor for new posts") // Port - port = flag.String("port", "5000", "HTTP port") + port = flag.String("port", "5000", "HTTP port") + domain = flag.String("domain", "mi.within.website", "domain this is being served on") ) func main() { flagenv.Parse() flag.Parse() + http.DefaultTransport = useragent.Transport("mi-posse", "https://" + *domain + "/.within/botinfo", http.DefaultTransport) + ctx := context.Background() r.SetTags("rethinkdb", "json")