real quick; i'll port more stuff over later...

This commit is contained in:
May 2024-03-27 11:52:42 -07:00 committed by GitHub
parent 010a2bf0c1
commit 77cfa27615
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,13 +24,13 @@ export default async function ServeError(
// serve error // serve error
return ctx.html( return ctx.req.header("accept").includes("text/html") ? ctx.html(
errorPage errorPage
.replaceAll("$code", code.toString()) .replaceAll("$code", code.toString())
.replaceAll("$text", reason), .replaceAll("$text", reason),
code as StatusCode, code as StatusCode/*,
{ {
"x-backup-status-message": reason, // glitch default nginx configuration "x-backup-status-message": reason, // glitch default nginx configuration
} }*/
) ) : ctx.text(reason, code as StatusCode)
} }