Skip to main content

Module debug

Module debug 

Source
Expand description

Admin API for debug mode: trace listing/retrieval and the plugin sandbox.

Every route except GET /api/debug/config responds 404 while debug.enabled is false. A 403 would confirm the surface exists, and these endpoints dump request contexts and execute plugins โ€” the highest value target on the box. The 404 is defence in depth behind the Basic Auth layer, not a replacement for it.

Discoverability is preserved two ways: each gated rejection logs a warning naming the exact config key, and GET /api/debug/config always answers so the web UI can render an explanatory empty state instead of a mystery.

Functionsยง

bad_request ๐Ÿ”’
clear_traces ๐Ÿ”’
DELETE /api/debug/traces โ€” empties the buffer.
disabled ๐Ÿ”’
The 404 returned when debug mode is off, matching the shape the rest of the Admin API uses for a missing resource.
get_config ๐Ÿ”’
GET /api/debug/config โ€” the effective debug settings.
get_trace ๐Ÿ”’
GET /api/debug/traces/{id} โ€” one trace with computed changes.
list_traces ๐Ÿ”’
GET /api/debug/traces โ€” summaries, newest first.
router
Builds the router for the /api/debug/* endpoints.
run_sandbox ๐Ÿ”’
POST /api/debug/sandbox โ€” run ad-hoc nodes or a named policy against a synthetic context.