mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-25 07:06:25 -08:00
real quick; i'll port more stuff over later...
This commit is contained in:
parent
010a2bf0c1
commit
77cfa27615
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue