2021-03-04 06:28:48 +00:00
|
|
|
<!DOCTYPE html>
|
2021-04-28 08:08:24 +00:00
|
|
|
<!--
|
|
|
|
Error {{ code }}: {{ message }}
|
|
|
|
Description: {{ description }}
|
|
|
|
-->
|
2021-03-04 06:28:48 +00:00
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<meta name="robots" content="noindex, nofollow"/>
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
<title>{{ code }} - {{ message }}</title>
|
|
|
|
<style>
|
|
|
|
html, body {
|
|
|
|
margin: 0;
|
|
|
|
background-color: #222;
|
|
|
|
color: #aaa;
|
2022-01-27 12:29:49 +00:00
|
|
|
font-family: 'Hack', monospace;
|
|
|
|
font-size: 0;
|
2021-03-04 06:28:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.full-height {
|
2022-01-27 12:29:49 +00:00
|
|
|
height: 100vh;
|
2021-03-04 06:28:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.flex-center {
|
|
|
|
align-items: center;
|
|
|
|
display: flex;
|
2022-01-27 12:29:49 +00:00
|
|
|
justify-content: center;
|
2021-03-04 06:28:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#error_text {
|
2022-01-27 12:29:49 +00:00
|
|
|
font-size: 32px;
|
2021-03-04 06:28:48 +00:00
|
|
|
}
|
2022-01-27 12:29:49 +00:00
|
|
|
|
|
|
|
/* {{ if show_details }} */
|
|
|
|
#details table {
|
|
|
|
width: 100%;
|
|
|
|
border-collapse: collapse;
|
|
|
|
box-sizing: border-box;
|
|
|
|
margin-top: 20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
#details.hidden td {
|
|
|
|
opacity: 0;
|
|
|
|
font-size: 0;
|
|
|
|
color: #222;
|
|
|
|
}
|
|
|
|
|
|
|
|
#details td {
|
|
|
|
font-size: 11px;
|
|
|
|
color: #999;
|
|
|
|
padding-top: .5em;
|
|
|
|
transition: opacity 1.4s, font-size .3s, color 1.2s;
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
#details td.name {
|
|
|
|
text-align: right;
|
|
|
|
padding-right: .3em;
|
|
|
|
width: 50%;
|
|
|
|
}
|
|
|
|
|
|
|
|
#details td.value {
|
|
|
|
text-align: left;
|
|
|
|
padding-left: .3em;
|
|
|
|
font-family: 'Lucida Console', 'Courier New', monospace;
|
|
|
|
}
|
|
|
|
/* {{ end }} */
|
2021-03-04 06:28:48 +00:00
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="flex-center full-height">
|
2022-01-27 12:29:49 +00:00
|
|
|
<div>
|
2022-03-23 19:31:34 +00:00
|
|
|
<span id="error_text">{{ code }}: <span data-l10n>{{ message }}</span></span>
|
2022-01-27 12:29:49 +00:00
|
|
|
{{ if show_details }}
|
|
|
|
<div class="hidden" id="details">
|
|
|
|
<table>
|
2022-01-31 05:40:58 +00:00
|
|
|
{{- if host }}
|
|
|
|
<tr>
|
2022-03-23 19:31:34 +00:00
|
|
|
<td class="name"><span data-l10n>Host</span>:</td>
|
2022-01-31 05:40:58 +00:00
|
|
|
<td class="value">{{ host }}</td>
|
|
|
|
</tr>
|
|
|
|
{{ end -}}
|
2022-01-27 12:29:49 +00:00
|
|
|
{{- if original_uri }}
|
|
|
|
<tr>
|
2022-03-23 19:31:34 +00:00
|
|
|
<td class="name"><span data-l10n>Original URI</span>:</td>
|
2022-01-27 12:29:49 +00:00
|
|
|
<td class="value">{{ original_uri }}</td>
|
|
|
|
</tr>
|
|
|
|
{{ end -}}
|
2022-01-31 05:40:58 +00:00
|
|
|
{{- if forwarded_for }}
|
|
|
|
<tr>
|
2022-03-23 19:31:34 +00:00
|
|
|
<td class="name"><span data-l10n>Forwarded for</span>:</td>
|
2022-01-31 05:40:58 +00:00
|
|
|
<td class="value">{{ forwarded_for }}</td>
|
|
|
|
</tr>
|
|
|
|
{{ end -}}
|
2022-01-27 12:29:49 +00:00
|
|
|
{{- if namespace }}
|
|
|
|
<tr>
|
2022-03-23 19:31:34 +00:00
|
|
|
<td class="name"><span data-l10n>Namespace</span>:</td>
|
2022-01-27 12:29:49 +00:00
|
|
|
<td class="value">{{ namespace }}</td>
|
|
|
|
</tr>
|
|
|
|
{{ end -}}
|
|
|
|
{{- if ingress_name }}
|
|
|
|
<tr>
|
2022-03-23 19:31:34 +00:00
|
|
|
<td class="name"><span data-l10n>Ingress name</span>:</td>
|
2022-01-27 12:29:49 +00:00
|
|
|
<td class="value">{{ ingress_name }}</td>
|
|
|
|
</tr>
|
|
|
|
{{ end -}}
|
|
|
|
{{- if service_name }}
|
|
|
|
<tr>
|
2022-03-23 19:31:34 +00:00
|
|
|
<td class="name"><span data-l10n>Service name</span>:</td>
|
2022-01-27 12:29:49 +00:00
|
|
|
<td class="value">{{ service_name }}</td>
|
|
|
|
</tr>
|
|
|
|
{{ end -}}
|
|
|
|
{{- if service_port }}
|
|
|
|
<tr>
|
2022-03-23 19:31:34 +00:00
|
|
|
<td class="name"><span data-l10n>Service port</span>:</td>
|
2022-01-27 12:29:49 +00:00
|
|
|
<td class="value">{{ service_port }}</td>
|
|
|
|
</tr>
|
|
|
|
{{ end -}}
|
|
|
|
{{- if request_id }}
|
|
|
|
<tr>
|
2022-03-23 19:31:34 +00:00
|
|
|
<td class="name"><span data-l10n>Request ID</span>:</td>
|
2022-01-27 12:29:49 +00:00
|
|
|
<td class="value">{{ request_id }}</td>
|
|
|
|
</tr>
|
|
|
|
{{ end -}}
|
|
|
|
<tr>
|
2022-03-23 19:31:34 +00:00
|
|
|
<td class="name"><span data-l10n>Timestamp</span>:</td>
|
2022-01-27 12:29:49 +00:00
|
|
|
<td class="value">{{ now.Unix }}</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
2021-03-04 06:28:48 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const $errorText = document.getElementById('error_text'),
|
|
|
|
characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-=+<>,./?[{()}]!@#$%^&*~`\|'.split('');
|
2022-03-23 19:31:34 +00:00
|
|
|
let text = $errorText.innerText, progress = 0;
|
2021-03-04 06:28:48 +00:00
|
|
|
|
|
|
|
const scrambleInterval = window.setInterval(function () {
|
|
|
|
let newText = text;
|
|
|
|
|
|
|
|
for (let i = 0; i < text.length; i++) {
|
|
|
|
if (i >= progress) {
|
|
|
|
newText = newText.substr(0, i) +
|
|
|
|
characters[Math.round(Math.random() * (characters.length - 1))] +
|
|
|
|
newText.substr(i + 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$errorText.innerText = newText;
|
2022-01-27 12:29:49 +00:00
|
|
|
}, 450 / 60);
|
|
|
|
|
|
|
|
// {{ if show_details }}
|
|
|
|
window.setTimeout(function () {
|
|
|
|
document.getElementById('details').classList.remove('hidden');
|
|
|
|
}, 550);
|
|
|
|
// {{ end }}
|
2021-03-04 06:28:48 +00:00
|
|
|
|
|
|
|
window.setTimeout(function () {
|
|
|
|
let revealInterval = window.setInterval(function () {
|
|
|
|
if (progress < text.length) {
|
|
|
|
progress++;
|
|
|
|
} else {
|
|
|
|
window.clearInterval(revealInterval);
|
|
|
|
window.clearInterval(scrambleInterval);
|
|
|
|
}
|
|
|
|
}, 70);
|
|
|
|
}, 350);
|
2022-03-23 19:31:34 +00:00
|
|
|
|
|
|
|
if (navigator.language.substring(0, 2).toLowerCase() !== 'en') {
|
|
|
|
((s, p) => { // localize the page (details here - https://github.com/tarampampam/error-pages/tree/master/l10n)
|
|
|
|
s.src = 'https://cdn.jsdelivr.net/gh/tarampampam/error-pages@2/l10n/l10n.min.js'; // '../l10n/l10n.js';
|
|
|
|
s.async = s.defer = true;
|
|
|
|
s.addEventListener('load', () => {p.removeChild(s); text = $errorText.innerText});
|
|
|
|
p.appendChild(s);
|
|
|
|
})(document.createElement('script'), document.body);
|
|
|
|
}
|
2021-03-04 06:28:48 +00:00
|
|
|
</script>
|
|
|
|
</body>
|
2021-04-28 08:08:24 +00:00
|
|
|
<!--
|
|
|
|
Error {{ code }}: {{ message }}
|
|
|
|
Description: {{ description }}
|
|
|
|
-->
|
2021-03-04 06:28:48 +00:00
|
|
|
</html>
|