From 0ae277ae9ad073c82ec394879526c06870d30183 Mon Sep 17 00:00:00 2001 From: Physcik Date: Fri, 26 Dec 2025 22:29:09 +0500 Subject: discord verification --- src/Render/Render.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Render/Render.go') diff --git a/src/Render/Render.go b/src/Render/Render.go index 130789c..45d81c0 100644 --- a/src/Render/Render.go +++ b/src/Render/Render.go @@ -19,9 +19,14 @@ type IndexTemplateContents struct { func RegisterEndpoints() { // http.Handle("static/", http.FileServer(http.FS(os.DirFS(settings.Current.StaticLocation)))) http.HandleFunc("/articles/{name}", test) + http.HandleFunc("/.well-known/discord", discord_verification) http.HandleFunc("/", mux) } +func discord_verification(w http.ResponseWriter, r *http.Request) { + http.ServeFile(w, r, fmt.Sprintf("%s/discord.txt", settings.Current.StaticLocation)) +} + func mux(w http.ResponseWriter, r *http.Request) { // slog.Info("Request", slog.String("URL", r.URL.String())) if r.URL.String() == "/favicon.ico" { -- cgit v1.3