Gobline processes and dispatches the request through a set of middlewares.
Below is the list of the default middlewares, executed in that order:
Matches the request with a route.
Adds the language for this request. Adds the route's callback handler if any has been defined.
Authorizes access to the route according to the current user's role.
Sanitizes and validates route parameters.
Executes the route's callback handler if any has been defined. Dispatches the request to an Action Model.
Sets the _action's value into _model for the next middlewares.
If the client request accepts JSON, return the JSON template's content.
Return the content of the HTML template.
_isSubRequest is used in order to disable the rendering of the layouts in the case the request is a sub request (hmvc).
You can create your own custom middleware by adding it into the middleware dispatcher: