Skip to content

fix: handle dynamic routes of any depth for WebController #186

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

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

alekseitylindus
Copy link
Contributor

Description

From https://discord.com/channels/919193495116337154/1316783891683610685

Change path=["/", "/{path:str}"] to path=["/", "/{path:path}"] in WebController to handle requests for all dynamic paths of any depth. It fixes cases where routes like /posts are handled but /posts/1 are not.

@alekseitylindus alekseitylindus requested review from cofin and a team as code owners December 12, 2024 16:33
Copy link

Copy link
Member

@cofin cofin left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the change.

@cofin cofin merged commit 7205e23 into litestar-org:main Dec 12, 2024
7 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