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"
|
r "gopkg.in/rethinkdb/rethinkdb-go.v6"
|
||||||
"within.website/ln"
|
"within.website/ln"
|
||||||
"within.website/ln/ex"
|
"within.website/ln/ex"
|
||||||
|
"within.website/x/web/useragent"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -35,12 +36,15 @@ var (
|
||||||
|
|
||||||
// Port
|
// 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() {
|
func main() {
|
||||||
flagenv.Parse()
|
flagenv.Parse()
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
http.DefaultTransport = useragent.Transport("mi-posse", "https://" + *domain + "/.within/botinfo", http.DefaultTransport)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
r.SetTags("rethinkdb", "json")
|
r.SetTags("rethinkdb", "json")
|
||||||
|
|
Loading…
Reference in New Issue