aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2019-11-28 18:22:38 +0000
committerChristine Dodrill <me@christine.website>2019-11-28 18:24:54 +0000
commit389f7b5a7764e3d0ca050d440393daadac8d176d (patch)
tree1b6e9d1d4829e3ee15a6705d48510fc96057a561 /internal
parent2dfde39f006f8e6fa69d68dd72dd10d67e9b1cfd (diff)
downloadx-389f7b5a7764e3d0ca050d440393daadac8d176d.tar.xz
x-389f7b5a7764e3d0ca050d440393daadac8d176d.zip
web: move useragent to its own package
Diffstat (limited to 'internal')
-rw-r--r--internal/internal.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/internal/internal.go b/internal/internal.go
index d84b212..1c78d60 100644
--- a/internal/internal.go
+++ b/internal/internal.go
@@ -14,15 +14,14 @@ import (
"within.website/ln/opname"
"within.website/x/internal/flagenv"
"within.website/x/internal/manpage"
+ "within.website/x/web/useragent"
// Debug routes
+ "net/http"
_ "net/http/pprof"
// Older projects use .env files, shim in compatibility
_ "github.com/joho/godotenv/autoload"
-
- // User agent init hook
- _ "within.website/x/web"
)
var (
@@ -80,3 +79,7 @@ func HandleStartup() {
manpage.Spew()
}
}
+
+func init() {
+ http.DefaultTransport = useragent.Transport("within.website-x", "https://within.website/.x.botinfo", http.DefaultTransport)
+}