From 9a6d2953964c631193488667827ecc89c25931c6 Mon Sep 17 00:00:00 2001 From: Chris Angelico Date: Fri, 13 Dec 2024 21:36:16 +1100 Subject: [PATCH] Dump all POST requests to console --- modules/http/chan_calendar.pike | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/http/chan_calendar.pike b/modules/http/chan_calendar.pike index 6ade934e..18b92665 100644 --- a/modules/http/chan_calendar.pike +++ b/modules/http/chan_calendar.pike @@ -22,6 +22,10 @@ __async__ mapping(string:mixed)|string http_request(Protocols.HTTP.Server.Reques return "Passing it along."; } //TODO: Handle webhooks, notably sending updates all any time the calendar changes + if (req->request_type == "POST") { + werror("POSSIBLE CALENDAR WEBHOOK\nHeaders %O\nBody: %O\n", req->request_headers, req->body_raw); + return "Okay."; + } if (!req->misc->is_mod) return render_template("login.md", req->misc->chaninfo); return render(req, ([ "vars": (["ws_group": ""]),