1
0
mirror of synced 2025-12-20 10:28:40 -05:00
Commit Graph

7 Commits

Author SHA1 Message Date
Mike Surowiec
89b08ccf26 fix: include builtAssets for error-404 page rendering 2021-04-13 10:48:55 -07:00
James M. Greene
c940dcd98b Middleware overhaul! (#18218)
* Middleware overhaul!

- Remove unnecessary 'async' keywords from middleware functions
- Ensure all middleware functions we create have names
- Wrap the method contents of all async middleware functions in a try-catch+next(error) pattern

* Use asyncMiddleware wrapper instead of try-catch+next(error) pattern

* Remove unnecessary try-catch+next(error) pattern from context middleware
2021-03-11 01:12:41 +00:00
James M. Greene
fd7d0eeb1a Add timeout and abort middleware and processing halts (#18177)
* Add middleware to timeout requests after a period

* Add halt-on-dropped-connection middleware to stop the middleware processing stack if the connection was already dropped

* Add a few strategic bail-out spots for dropped connections during the render-page middleware

* Handle 404s and HEAD requests earlier in the page rendering flow

* Add a few more strategic bail-out spots for dropped connections during the render-page middleware

* Add middleware to notice aborted requests

* Add a check for aborted requests into the isConnectionDropped logic

* Reformat comment for consistency

* Handle aborted requests correctly in the error handler

* Explicit returns for consistency
2021-03-09 19:14:02 +00:00
James M. Greene
1921855816 Error middleware improvements (#18169)
* Defer logging to Failbot in error middleware until AFTER we finish responding

* If headers have already been written, log to failbot and then delegate to the default error handler

http://expressjs.com/en/guide/error-handling.html#the-default-error-handler

* Comment tweak
2021-03-08 21:56:56 +00:00
Jason Etcovitch
d98bb561c7 Honor Error.status(Code) in handle-errors middleware (#17768)
* Honor error status codes in handle-errors

* Add a test
2021-02-09 14:57:57 -05:00
Chiedo John
9f10fdd033 Improve performance of csrf errors (#16136)
* Improve performance of csrf errors

* Fix handle csrf error middleware

Co-authored-by: Chiedo <chiedo@users.noreply.github.com>
2020-10-20 11:42:05 -04:00
Vanessa Yuen
3df90fc9b8 Hello git history spelunker!
Are you looking for something? Here is all of the GitHub Docs history in one single commit. Enjoy! 🎉
2020-09-27 14:10:11 +02:00