Feature: Receptor de webhooks interno para debug
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m3s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m3s
- Endpoint POST /api/debug/webhook-receiver para recibir webhooks - Almacenamiento en memoria de ultimos 100 eventos - Endpoint GET/DELETE para consultar/limpiar eventos - Nueva tab Webhooks en seccion Debug con polling cada 5s
This commit is contained in:
16
server/api/debug/webhook-events.delete.ts
Normal file
16
server/api/debug/webhook-events.delete.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* DELETE /api/debug/webhook-events
|
||||
* Clear all stored debug webhook events
|
||||
*/
|
||||
import { debugWebhookStore } from '../../services/debug/webhook-store'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const username = getHeader(event, 'x-authentik-username')
|
||||
if (!username) {
|
||||
throw createError({ statusCode: 401, message: 'Unauthorized' })
|
||||
}
|
||||
|
||||
debugWebhookStore.clear()
|
||||
|
||||
return { success: true, message: 'Events cleared' }
|
||||
})
|
||||
Reference in New Issue
Block a user