-
Notifications
You must be signed in to change notification settings - Fork 4k
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
add option to allow access methods from default url #1214
Conversation
这个没必要修改代码,在mapping中增加一行自己到自己的映射关系即可: |
不支持添加 service 同名的映射吧? 我这里会提示:
添加时在这里是不是限制了? |
@gydong 这样是可以通过 我这边的场景是服务端希望可以支持
同时还希望保留 |
嗯,你说的对,我去了解一下相关背景,看看如何满足你的需求更合适 |
src/brpc/server.h
Outdated
@@ -334,6 +339,7 @@ class Server { | |||
struct MethodProperty { | |||
bool is_builtin_service; | |||
bool own_method_status; | |||
bool restful_mapped_only; |
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.
这个要移到下面的params中。
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.
已改
src/brpc/server.h
Outdated
// Work with restful_mappings, if this flag is true, reject methods accessed | ||
// from default urls (SERVICE/METHOD). | ||
// Default: true | ||
bool restful_mapped_only; |
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.
叫allow_default_url吧,更明确一点。注意改名后,值是相反的。
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.
已改
travis 在编译 unittest 时失败, 但应该与此次改动无关. |
@wasphin thanks for the commit and UT |
No description provided.