Production
Security
The debugger can read logs, run cache commands, and log in as other users. This page explains what guards it.
Access
- Every page and every API call goes through the access check. See Access control.
- Without
Debugger::auth()or theviewDebuggergate, the debugger only opens in thelocalenvironment. - Actions that change something use the CSRF token from the app's session.
DEBUGGER_ENABLED=falseremoves every debugger route.
Read-only mode
In production, every action is off by default. See Read-only mode.
Logs
- Only files in
storage/logsare read. A file is picked from the list, never from a path the browser sends, so../can't be used. - The debugger can't delete or change log files.
Storage
- Test files are stored with private visibility.
- Only files in the test folder can be opened or deleted.
- Files open with a type set from the extension, never from their content, and with the
Content-Security-Policy: sandboxandX-Content-Type-Options: nosniffheaders. An opened file can't run scripts on your app's domain.
Passwords and tokens
- Mailer passwords, keys, and tokens are never shown. The Mail page shows only the mailer, host, port, and From address.
- API headers on the Connections page are never shown.
- Error messages from the mailer, disks, and APIs are filtered first. Values like
password=...,token=...,Bearer ..., and connection URLs likemysql://...orredis://...are replaced with***.
Impersonation
- You can't log in as yourself or nest impersonation.
- The
impersonategate limits who may do it, andbeImpersonatedlimits who may be logged in as. - The session is regenerated when you start and when you go back.
- The bar in the app always reminds you that you are using someone else's account.
Audit log
Every action is written to the debugger_audit_logs table: who, which action, its target, the IP, and the time. What is recorded:
- Retry, Retry all, and Delete in Queue
- Clear and Rebuild in Cache
- Test emails
- Upload and Delete in Storage
- Starting and stopping impersonation
The audit log is kept for audit.retention_days days (the default is 90) and cleaned up by debugger:prune.