Skip to content

Create Filter to handle URLs with trailing slashes #31366

Closed
@rstoyanchev

Description

@rstoyanchev

Matching URLs with a trailing slash was deprecated in 6.0 in favor of early handling via proxy or Filter like UrlRewriteFilter, see #28552 for details. The continued feedback on the issue, however, makes it clear we need to go further and provide built-in support.

This can be a Filter ordered as early as possible, e.g. ahead of security, that handles URLs with a trailing slash. One option is a permanent redirect, and another is to rewrite the request like UrlRewriteFilter. This can be configurable by URL pattern or for all requests. Another suggestion from #28552 (comment) is to log URLs with a trailing slash in order to discover and phase them out.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions