From 654f273baaaba63bf73fd46a65ecd1440c4758fe Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Tue, 4 Jun 2019 13:35:44 -0400 Subject: [minor] move to within.website/x (#14) * move to within.website/x * Update user_agent.go * cmd/within.website: add bot info page --- cmd/within.website/build.go | 6 +++--- cmd/within.website/main.go | 18 ++++++++++++++++-- 2 files changed, 19 insertions(+), 5 deletions(-) (limited to 'cmd/within.website') diff --git a/cmd/within.website/build.go b/cmd/within.website/build.go index 40ab861..43923fb 100644 --- a/cmd/within.website/build.go +++ b/cmd/within.website/build.go @@ -8,9 +8,9 @@ import ( "log" "os" - "github.com/Xe/x/internal/kahless" - "github.com/Xe/x/internal/minipaas" - "github.com/Xe/x/internal/yeet" + "within.website/x/internal/kahless" + "within.website/x/internal/minipaas" + "within.website/x/internal/yeet" ) func main() { diff --git a/cmd/within.website/main.go b/cmd/within.website/main.go index 834d70a..fbcb552 100644 --- a/cmd/within.website/main.go +++ b/cmd/within.website/main.go @@ -5,12 +5,12 @@ import ( "flag" "net/http" - "github.com/Xe/x/internal" - "github.com/Xe/x/vanity" assetfs "github.com/elazarl/go-bindata-assetfs" "github.com/mmikulicic/stringlist" "within.website/ln" "within.website/ln/opname" + "within.website/x/internal" + "within.website/x/vanity" ) //go:generate go-bindata -pkg main static @@ -85,6 +85,11 @@ func main() { w.Write([]byte(indexTemplate)) }) + http.HandleFunc("/.x.botinfo", func(w http.ResponseWriter, r *http.Request) { + w.Header().Add("Content-Type", "text/html") + w.Write([]byte(botInfoPage)) + }) + ln.Log(ctx, ln.F{"port": *port}, ln.Info("Listening on HTTP")) http.ListenAndServe(":"+*port, nil) @@ -116,3 +121,12 @@ const indexTemplate = ` ` + +const botInfoPage = ` +
+

x repo bots

+ +Hello, if you are reading this, you have found this URL in your access logs. + +If one of these programs is doing something you don't want them to do, please contact me or open an issue here. +
` -- cgit v1.2.3