mirror of
https://github.com/donlon/cloudflare-error-page.git
synced 2025-12-19 14:59:28 +00:00
editor/ui: hide error_code in html title if it's not a number
This commit is contained in:
@@ -313,6 +313,9 @@
|
||||
cfg.time = formatUtcTimestamp()
|
||||
cfg.ray_id = '0123456789abcdef'
|
||||
cfg.client_ip = '1.1.1.1'
|
||||
if (Number.isNaN(Number(cfg.error_code))) {
|
||||
cfg.html_title = cfg.title || 'Internal server error'
|
||||
}
|
||||
|
||||
let pageHtml = renderEjs(cfg)
|
||||
// Write into iframe
|
||||
|
||||
Reference in New Issue
Block a user