index — crispy-website @ 8545f0ccd972f327b428ca62374905fd42aea57a

My personal homepage (very crispy)

discord add verification thingy
crispy-caesus 114518720+crispy-caesus@users.noreply.github.com
Fri, 01 Nov 2024 23:13:25 +0100
commit

8545f0ccd972f327b428ca62374905fd42aea57a

parent

8d7d3ab65f3db43afc685f17185d6b0085ae2dbd

1 files changed, 11 insertions(+), 0 deletions(-)

jump to
M index.goindex.go

@@ -29,6 +29,12 @@ p := &Page{Title: title}

renderTemplate(w, "index", p) } +// New handler for plain text response +func plainTextHandler(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "text/plain") // Set content type to plain text + w.Write([]byte("dh=b81129b4e9cc388c5ab63919550316fc3ca5ebe4")) // Write the plain text response +} + func main() { // Serve static files from the "static" directory at the "/static/" path fs := http.FileServer(http.Dir("static"))

@@ -36,5 +42,10 @@ http.Handle("/static/", http.StripPrefix("/static/", fs))

// Set up the main route http.HandleFunc("/", viewHandler) + + // Set up a new route for plain text + http.HandleFunc("/.well-known/discord", plainTextHandler) + log.Fatal(http.ListenAndServe(":8080", nil)) } +