Advanced topics

Tutorials

Books

Intercepting requests

Using Filters

The filter component allows you to intercept requests coming to the application, transform request and responses. Filters provide a nice ability to implement cross-cutting concerns of your application. You can create a filter by extending the Filter trait and then add the filter to Global object. The following example creates an access log filter that logs the result of all the actions: