Skip to content

Conversation

@darth-raijin
Copy link
Contributor

Motivation

The current route_layer documentation incorrectly implies that middleware applied via route_layer will also run on the fallback route. This is not the case, and this PR clarifies the intent.

Issue #3421 was created, with a PR to correct the bug in the documentation. However, that PR has been stale for multiple weeks.

Solution

  • Remove misleading section (and / or fallback) in route_layer.md
  • No functional changes, the PR updates documentation only.

Clarify the order of adding routes and applying route_layer middleware.
Copy link
Member

@jplatte jplatte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@jplatte jplatte merged commit 7fd17ce into tokio-rs:main Nov 21, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants