cmd/mi: use user agent

This commit is contained in:
Cadey Ratio 2020-01-11 15:28:46 -05:00
parent 285db408be
commit 280f09d287
1 changed files with 5 additions and 1 deletions

View File

@ -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")