-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
📝 [Proposal]: Branching handlers and with rules #3260
Comments
Pretty sure this would make the router slower, since checking headers is an expensive operation on top of checking the handler |
It could be optional if it causes performance issues. |
@dozheiny What are the situations in which this recommendation could be used in actual production development work? |
right the performance should drop if you activate the feature because more checks are necessary but still it is an interesting feature @coderabbitai |
coderabbitai doesn't seem to be giving any replies. @ReneWerner87 Can this bot be used like chatgpt inside a GitHub issue? |
@coderabbitai please give examples where it is used in other languages and frameworks and show usage examples |
It can be used for different user types like admins and normal users. It can route different users to different controllers by using a specific header value or something else. |
I believe you can do this already using |
@gaby True, but my point is to reduce middleware implementations or redirections. |
Only thing I can think off is adding a middleware named This kind of access control is not normally done using headers. There's other middlewares that check auth headers to handle stuff like this. |
It's okay; that was just an idea that came to mind. I think we can close the issue since there are no examples or implementations in other frameworks. |
Feature Proposal Description
HTTP servers usually use HTTP methods (like GET, POST, and PATCH) to separate and isolate the requests sent to them.
I'm thinking about more ways to separate and isolate requests. For example, I could separate requests by specific header value or specific value on URL query.
Alignment with Express API
I didn't find anything
HTTP RFC Standards Compliance
Confirmed
API Stability
Feature Examples
Checklist:
The text was updated successfully, but these errors were encountered: