node.js - Proper way to remove middleware from the Express stack? -
is there canonical way remove middleware added app.use stack? seems should possible modify app.stack array directly, wondering if there documented method should considering first.
use comes connect (not express), , all push middleware function onto app's stack.
so should fine splicing function out of array.
however, keep in mind there no documentation around app.stack nor there function remove middleware. run risk of future version of connect making changes incompatible code.
Comments
Post a Comment