feat: log every incoming webhook request before validation

Saves a raw entry to webhook_logs immediately on any POST to the webhook,
before HMAC check or JSON parsing. Shows HMAC status (ok/invalida/sin-firma).
Live feed now shows all traffic including rejected and malformed payloads.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-22 11:39:23 -05:00
co-authored by Claude Sonnet 4.6
parent 483cc4797e
commit 454ee297e2
2 changed files with 41 additions and 11 deletions
+2 -1
View File
@@ -83,6 +83,7 @@ class DashboardController
.b-interactive{background:#ede7f6;color:#4527a0}
.b-button{background:#e3f2fd;color:#0d47a1}
.b-status{background:#f3f4f6;color:#6b7280}
.b-raw{background:#fef9c3;color:#854d0e}
.b-other{background:#f5f5f5;color:#555}
</style>
<div class="toolbar">
@@ -104,7 +105,7 @@ class DashboardController
</div>
<script>
const ICONS = {text:'&#128172;',image:'&#128247;',audio:'&#127925;',video:'&#127916;',document:'&#128196;',sticker:'&#127774;',reaction:'&#128077;',location:'&#128205;',interactive:'&#128280;',button:'&#128306;',status:'&#128202;'};
const ICONS = {text:'&#128172;',image:'&#128247;',audio:'&#127925;',video:'&#127916;',document:'&#128196;',sticker:'&#127774;',reaction:'&#128077;',location:'&#128205;',interactive:'&#128280;',button:'&#128306;',status:'&#128202;',raw:'&#128268;'};
const BADGE = t => 'b-'+(ICONS[t]?t:'other');
let paused = false;