提交 8268c969 编写于 作者: R runzexia 提交者: zryfish

request devops api with auth info

上级 57f3eed2
......@@ -130,7 +130,9 @@ func (h Auth) InjectContext(req *http.Request, token *jwt.Token) (*http.Request,
}
// hard code, support jenkins auth plugin
if httpserver.Path(req.URL.Path).Matches("/kapis/jenkins.kubesphere.io") || httpserver.Path(req.URL.Path).Matches("job") {
if httpserver.Path(req.URL.Path).Matches("/kapis/jenkins.kubesphere.io") ||
httpserver.Path(req.URL.Path).Matches("job") ||
httpserver.Path(req.URL.Path).Matches("/kapi/devops.kubesphere.io/v1alpha2") {
req.SetBasicAuth(username, token.Raw)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册