-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: normalize put route #124
Conversation
Following [this comment](#123 (review)), added a middleware to normalize the path of the route.
WalkthroughThe recent changes in Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Router
participant NormalizePathLayer
participant Service
Client->>Router: HTTP Request
Router->>NormalizePathLayer: Apply NormalizePathLayer
NormalizePathLayer->>Router: Normalized Path
Router->>Service: Forward Request
Service->>Router: Response
Router->>Client: HTTP Response
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
Cargo.lock
is excluded by!**/*.lock
Files selected for processing (2)
- bin/sidecar/Cargo.toml (1 hunks)
- bin/sidecar/src/main.rs (3 hunks)
Additional comments not posted (4)
bin/sidecar/Cargo.toml (1)
22-23
: Dependencies update approved.The addition of
tower
and the update oftower-http
with thenormalize-path
feature are appropriate for the middleware implementation.bin/sidecar/src/main.rs (3)
18-21
: Imports approved.The imports for
tower::Layer
andtower_http::normalize_path::NormalizePathLayer
are necessary and correctly added.
235-235
: Path normalization layer applied correctly.The
NormalizePathLayer
is correctly applied to the router, ensuring path normalization.
241-241
: Server binding with normalized router approved.The server correctly uses the
router_normalized
for binding, ensuring that the path normalization is effective.
Following this comment, added a middleware to normalize the path of the route.
This change is
Summary by CodeRabbit