mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-21 21:36:26 -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
|
||||
return ctx.html(
|
||||
return ctx.req.header("accept").includes("text/html") ? ctx.html(
|
||||
errorPage
|
||||
.replaceAll("$code", code.toString())
|
||||
.replaceAll("$text", reason),
|
||||
code as StatusCode,
|
||||
code as StatusCode/*,
|
||||
{
|
||||
"x-backup-status-message": reason, // glitch default nginx configuration
|
||||
}
|
||||
)
|
||||
}*/
|
||||
) : ctx.text(reason, code as StatusCode)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue