Posted On: Feb 22, 2018
Terminable middleware is implemented after the request has been run and before the response is ready. The response and request object inside a terminate method of the Terminable middleware is received, but the response cannot be changed it has been returned already. When the response is on the way to a browser, terminable middleware allows executing a middleware that is processed.
If a terminate method is defined in middleware and a web server is implying the Fast CGI method, then the terminate method will be automatically executed after the response is sent to a browser.
Never Miss an Articles from us.