feat: add admin-controlled authentication debug mode
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Mahak Authentication Error</title>
|
||||
<style>
|
||||
body { margin: 2rem; color: #1d2327; background: #f0f0f1; font: 14px/1.5 monospace; }
|
||||
main { max-width: 1100px; margin: auto; padding: 2rem; background: #fff; border-left: 4px solid #d63638; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
|
||||
h1 { margin-top: 0; color: #d63638; font: 24px/1.3 sans-serif; }
|
||||
dt { margin-top: 1rem; font-weight: 700; }
|
||||
dd { margin: .25rem 0 0; overflow-wrap: anywhere; }
|
||||
pre { overflow: auto; padding: 1rem; color: #f0f0f1; background: #1d2327; white-space: pre-wrap; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<h1>Mahak Authentication Error</h1>
|
||||
<dl>
|
||||
<dt>Exception</dt>
|
||||
<dd><?= esc_html(get_class($exception)) ?></dd>
|
||||
<dt>Message</dt>
|
||||
<dd><?= esc_html($exception->getMessage()) ?></dd>
|
||||
<dt>Location</dt>
|
||||
<dd><?= esc_html($exception->getFile().':'.$exception->getLine()) ?></dd>
|
||||
</dl>
|
||||
<h2>Stack trace</h2>
|
||||
<pre><?= esc_html($exception->getTraceAsString()) ?></pre>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
<!-- views/invalid-token.php -->
|
||||
<!-- views/server-error.php -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
@@ -11,4 +11,4 @@
|
||||
<p>مشکلی پیش آمده، لطفا تا دقایق دیگر دوباره امتحان کنید.</p>
|
||||
<a href="<?= home_url() ?>">بازگشت به صفحه اصلی</a>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user