Package io.micronaut.http.filter
Interface ConditionalFilter
- All Known Implementing Classes:
CorsFilter
public interface ConditionalFilter
The condition for instances of
RequestFilter
and ResponseFilter
filters.
Allowing to skip all the method filters if isEnabled(HttpRequest)
returns false.- Since:
- 4.3.0
- Author:
- Denis Stepanov
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isEnabled
(HttpRequest<?> request) The filter condition.
-
Method Details
-
isEnabled
The filter condition.- Parameters:
request
- The request- Returns:
- true if the filter is enabled
-