fix: handle Caddy-proxied payment webhooks and method selection

This commit is contained in:
3252a8
2026-05-18 22:45:42 +03:00
parent 49cf5ebad8
commit e3643ee9a0
7 changed files with 56 additions and 7 deletions
+9 -1
View File
@@ -263,7 +263,15 @@ class WataService(HttpClientMixin):
client_ip = request_client_ip(request, trusted_proxies=self.settings.trusted_proxies)
trusted = self.config.trusted_ips_list
if trusted and not ip_in_allowlist(client_ip, trusted):
logging.warning("Wata webhook denied from unauthorized IP source.")
logging.warning(
"Wata webhook denied from unauthorized IP source "
"(client_ip=%s remote=%s x_forwarded_for=%s trusted_ips=%s trusted_proxies=%s).",
client_ip,
request.remote,
request.headers.get("X-Forwarded-For"),
trusted,
self.settings.trusted_proxies,
)
return web.Response(status=403, text="forbidden")
raw_body = await request.read()