I'm using Play Framework 2.5.12 (Java version). When I declare a filter (Filters1) and set below config in application.conf:
play.http.filters = my.filter.path.Filters1
It works fine.
But I have two filters:
- Filters1 extends DefaultHttpFilters class
- Filters2 extends Filter class
In Play Framework 2.6 , solution is:
play.http.filters += my.filter.path.Filters1
play.http.filters += my.filter.path.Filters2
I have tried that, but it didn't work in Play Framework 2.5. What is your solution?
Finally I couldn't handle this problem in application.conf.
Solution :
You have to pass your filter as a parameter in constructor of Filters1 and set it as EssentialFilters.
This is my Filters1 class :
and Filters2 class :