Fix: Usar URL interna para debug webhook receiver (bypass authentik)
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m4s

This commit is contained in:
2025-12-02 21:27:45 -06:00
parent 80d0042c7e
commit 8f44826e64
14 changed files with 642 additions and 21 deletions

View File

@@ -123,11 +123,19 @@ class WebhookDispatcher {
headers['X-Webhook-Signature'] = `sha256=${signature}`
}
// Check if the URL is pointing to our own debug receiver
// If so, use internal URL to bypass authentik
let targetUrl = webhook.url
if (webhook.url.includes('/api/debug/webhook-receiver')) {
const internalPort = process.env.PORT || 3000
targetUrl = `http://localhost:${internalPort}/api/debug/webhook-receiver`
}
const controller = new AbortController()
const timeout = setTimeout(() => controller.abort(), webhook.timeout_ms)
try {
const response = await fetch(webhook.url, {
const response = await fetch(targetUrl, {
method: 'POST',
headers,
body,