NAME

PAGI::Middleware::Debug - Development debug panel middleware

SYNOPSIS

use PAGI::Middleware::Builder;

my $app = builder {
    enable 'Debug',
        enabled => $ENV{PAGI_DEBUG};
    $my_app;
};

DESCRIPTION

PAGI::Middleware::Debug injects a debug panel into HTML responses showing request/response details, timing breakdown, and headers. Only enabled in development mode.

CONFIGURATION

  • enabled (default: 0)

    Enable the debug panel. Should only be true in development.

  • show_headers (default: 1)

    Show request/response headers in debug panel.

  • show_scope (default: 1)

    Show scope contents in debug panel.

  • show_timing (default: 1)

    Show timing breakdown in debug panel.

SECURITY WARNING

This middleware should NEVER be enabled in production. The debug panel exposes sensitive information including headers, cookies, and internal application details that could be exploited by attackers.

Always ensure enabled is false in production environments.

SEE ALSO

PAGI::Middleware - Base class for middleware

PAGI::Middleware::Lint - PAGI compliance validation