cmd/mi: use user agent
This commit is contained in:
parent
285db408be
commit
280f09d287
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue