diff options
| author | Christine Dodrill <me@christine.website> | 2019-06-04 13:35:44 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-04 13:35:44 -0400 |
| commit | 654f273baaaba63bf73fd46a65ecd1440c4758fe (patch) | |
| tree | 00db6f9b02cc8f6e8cff51a22819e34b582b9c6b /cmd/within.website/main.go | |
| parent | 7ce978fdecebdf623700fd8c5f882846f1a610ea (diff) | |
| download | x-654f273baaaba63bf73fd46a65ecd1440c4758fe.tar.xz x-654f273baaaba63bf73fd46a65ecd1440c4758fe.zip | |
[minor] move to within.website/x (#14)
* move to within.website/x
* Update user_agent.go
* cmd/within.website: add bot info page
Diffstat (limited to 'cmd/within.website/main.go')
| -rw-r--r-- | cmd/within.website/main.go | 18 |
1 files changed, 16 insertions, 2 deletions
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 = `<!DOCTYPE html> </main> </body> </html>` + +const botInfoPage = `<link rel="stylesheet" href="/static/gruvbox.css"> +<main> +<h1>x repo bots</h1> + +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 <a href="https://christine.website/contact">contact me</a> or open an issue <a href="https://github.com/Xe/x">here</a>. +</main>` |
