Class UrlHandlerFilter

java.lang.Object
org.springframework.web.filter.reactive.UrlHandlerFilter
All Implemented Interfaces:
WebFilter

public final class UrlHandlerFilter extends Object implements WebFilter
WebFilter that modifies the URL, and then redirects or wraps the request to apply the change.

To create an instance, you can use the following:

UrlHandlerFilter filter = UrlHandlerFilter
   .trailingSlashHandler("/path1/**").redirect(HttpStatus.PERMANENT_REDIRECT)
   .trailingSlashHandler("/path2/**").mutateRequest()
   .build();

This WebFilter should be ordered ahead of security filters.

Since:
6.2
Author:
Rossen Stoyanchev