Skip to content
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

Cannot enable local middleware for specific hanlder while using app.route_dynamic. #717

Open
Jawwad-danish opened this issue Nov 1, 2023 · 0 comments
Labels
question Issue can be closed by providing information

Comments

@Jawwad-danish
Copy link

I have configured routes in database for my crow application. Therefore, I am calling app.route_dynamic(url) to set routes instead of calling app.routecrow::black_magic::get_parameter_tag(url)(url) or CROW_ROUTE(app, url). Now I want to enable local middlewares for specific handlers but when I call CROW_MIDDLEWARE(app, my_local_middleware), error occurs.

error: DynamicRule has no member function middlewares.

I went through the crow code and found that since only Taggedrule has the middlewares() function (which enables the middleware to the route), local middlewares can be set only using app.routecrow::black_magic::get_parameter_tag(url)(url). How can I set local middleware if I am using app.route_dynamic.

@gittiver gittiver added the question Issue can be closed by providing information label Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Issue can be closed by providing information
Projects
None yet
Development

No branches or pull requests

2 participants