From 2a309753257503349361aeae44454079c59aaa8a Mon Sep 17 00:00:00 2001 From: jaxperro Date: Sat, 13 Jun 2026 16:52:03 -0400 Subject: [PATCH] webhook_receiver: add User-Agent to Discord POST (Discord 403s default urllib UA) --- webhook_receiver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webhook_receiver.py b/webhook_receiver.py index 5734309e..3160f97a 100644 --- a/webhook_receiver.py +++ b/webhook_receiver.py @@ -74,7 +74,8 @@ def post_discord(content): try: body = json.dumps({"content": content}).encode() req = urllib.request.Request(WEBHOOK, data=body, method="POST", - headers={"Content-Type": "application/json"}) + headers={"Content-Type": "application/json", + "User-Agent": "Mozilla/5.0"}) # Discord 403s default UA urllib.request.urlopen(req, timeout=10, context=SSL_CTX).read() except (urllib.error.URLError, TimeoutError): log("⚠ Discord post failed")