jaysylvester / citizen

Node.js MVC web application framework. Includes routing, serving, caching, session management, and other helpful tools.
MIT License
100 stars 7 forks source link

Controller config alters the citizen config for all subsequent controllers in the chain #114

Closed jaysylvester closed 2 years ago

jaysylvester commented 3 years ago

Since it's a controller config, it should probably only alter the config for that specific controller.

Consider adding a global controller config to handle this case.

jaysylvester commented 2 years ago

Rather than complicate controller configs further, I simply added a config reset for each include controller and prior to controller handoff. Controllers will remain sandboxed instead of passing custom controller configs down the route chain to subsequent controllers.