From 992239ff1f3809d3614a915b252e80e0ec156d56 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Mon, 25 Sep 2023 22:09:33 +0300 Subject: [PATCH] fix: return if method is not correct --- main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/main.go b/main.go index 4e31255..b83ba4c 100644 --- a/main.go +++ b/main.go @@ -44,6 +44,7 @@ func handleRoot(w http.ResponseWriter, r *http.Request) { if r.Method != "GET" { w.WriteHeader(http.StatusBadRequest) + return } var Type ResponseType Type = ResponseType(r.URL.Query().Get("t"))