Skip to content

Add pattern syntax for optional trailing slash #3281

@tp971

Description

@tp971

I proposed this idea in #3258 (comment) to handle cases where trailing slashes are relevant. Basically, allow defining a route with a pattern like "/some/path/?" that matches both "/some/path" and "/some/path/". I also proposed to add a method to check whether the URI has a trailing slash, but that can also be done with request.uri().path().ends_with('/'), so idk whether we actually need this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-routerproject: routerA-webproject: actix-webC-featureCategory: new functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions