-
Notifications
You must be signed in to change notification settings - Fork 2
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
PANDARIA: Fix show unauthorized when group member to get the monitor data #10
Conversation
在代码旁边加一下comment和issue链接,其他没什么问题 |
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.
把user header key一起改了,不然只是为了规避问题只改group header有点奇怪
@orangedeng Update! |
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.
PR本身没什么问题,但是用户升级了rancher server之后,是不是监控就看不到数据了?是不是监控也需要升级,这个升级能否接受。
|
@orangedeng @aiwantaozi can u please help to review it again, thanks |
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.
LGTM
在通过方式
r.Header["Key"]
获取请求头数组时key需要遵循大驼峰的规范,否则返回的为nil具体查看 golang/go#34799
golang 1.14 开始支持 r.Header.Values(key string) 方法获取请求头 map 对应的数组,但是当前 repo 还是golang 1.13。所以暂时修改 key
X-RANCHER-GROUP
的命名Relate issue:
https://github.com/cnrancher/pandaria/issues/1187