Skip to content

Trailing slash detected as different route #2

@http-samc

Description

@http-samc

Bug description

Axum detects trailing slashes as a different route, which isn't generally desired. E.g., if we use RBAC and allow the "Paid" role to access /core/* routes, it throws a 401 for a request to /core but validates a request to /core/.

  • Would you like to work on a fix? [Y]

To Reproduce

Make the request above with this policy added to bouncer.config.yaml (configure roles appropriately).

"@bouncer/authorization/rbac/v1":
  route_roles:
    "/status": ["Free"]
    "/core/*": ["Status"]

Expected behavior

/core/ and /core should be treated the same by default.

Screenshots

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions