summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/main.go b/main.go
index aef29cb..4f8501a 100644
--- a/main.go
+++ b/main.go
@@ -61,10 +61,9 @@ func main() {
}
defer r.Body.Close()
- // Attempt to parse JSON (optional, if you still want to try)
var data map[string]any
if json.Unmarshal(body, &data) != nil {
- addRotLog(&logs, &n, fmt.Sprintf(`{"authRequest": %s}`, string(body))) // Logs unmodified string
+ addRotLog(&logs, &n, fmt.Sprintf(`{"authRequest": %s}`, string(body)))
http.Error(w, "Forbidden", http.StatusForbidden)
return
}
@@ -75,7 +74,6 @@ func main() {
}
}
http.Error(w, "Forbidden", http.StatusForbidden)
-
})
// Start the server on port 8080