Each filter added for an already existing URL pattern causes the filter applied formerly to be overwritten.
Sometimes it would be very convenient to be able to apply multiple filters for the same URL pattern, e.g. first an authentication and afterwards an authorization filter.
Then the router should apply both filters in the order they were added, i.e. _filters[url] should be a List or a Queue and filter should perform something like
_filters[url].add(filter);
(The workarounds – either to combine all the applicable filters in a separate function or to create multiple URL patterns which all resolve to the very same route – are both quite ugly and inconvenient.)
Currently only one filter per URL pattern can be applied:
Each filter added for an already existing URL pattern causes the filter applied formerly to be overwritten.
Sometimes it would be very convenient to be able to apply multiple filters for the same URL pattern, e.g. first an authentication and afterwards an authorization filter.
Then the router should apply both filters in the order they were added, i.e.
_filters[url]
should be a List or a Queue andfilter
should perform something like(The workarounds – either to combine all the applicable filters in a separate function or to create multiple URL patterns which all resolve to the very same route – are both quite ugly and inconvenient.)