Ghost/core/server/web/shared/middleware
Hannah Wolfe 0799f02e80
Rewritten HTMLErrorRenderer w/o asset helper & template
refs: 2af9e2e12

- This new HTMLErrorRenderer is borrowed heavily from finalHandler
   - This is the module that express uses to render errors if there is no custom errorhandler
- It just renders a really simple html page wrapping err.stack in a <pre>
   - This results in a nicely formatted, but unstyled error page
- I also updated BasicErrorRenderer to use the same res.statusCode + err.stack pattern rather than err.message

Note: This error renderer is _only_ used for renderering errors on the `/ghost/` route
 - In almost all cases, errors here are rendered by Ember
 - The only error that can be rendered here is a missing template error see: 2af9e2e12
2021-11-24 13:01:06 +00:00
..
api Renamed middlewares to middleware consistently 2021-11-16 15:51:47 +00:00
brute.js Renamed middlewares to middleware consistently 2021-11-16 15:51:47 +00:00
cache-control.js Renamed middlewares to middleware consistently 2021-11-16 15:51:47 +00:00
error-handler.js Rewritten HTMLErrorRenderer w/o asset helper & template 2021-11-24 13:01:06 +00:00
index.js Merged our two maintenance middleware into one 2021-11-24 11:27:18 +00:00
pretty-urls.js Renamed middlewares to middleware consistently 2021-11-16 15:51:47 +00:00
uncapitalise.js Renamed middlewares to middleware consistently 2021-11-16 15:51:47 +00:00
url-redirects.js Renamed middlewares to middleware consistently 2021-11-16 15:51:47 +00:00