Merge pull request #190 from wansir/master

add openpitrix proxy token
This commit is contained in:
zryfish
2018-10-12 09:58:22 +08:00
committed by GitHub
2 changed files with 17 additions and 0 deletions

View File

@@ -28,6 +28,8 @@ import (
"github.com/golang/glog"
"github.com/jinzhu/gorm"
"github.com/pkg/errors"
"kubesphere.io/kubesphere/pkg/constants"
)
const (
@@ -78,6 +80,8 @@ func makeHttpRequest(method, url, data string) ([]byte, error) {
req, err = http.NewRequest(method, url, strings.NewReader(data))
}
req.Header.Add("Authorization", constants.OpenPitrixProxyToken)
if err != nil {
glog.Error(err)
return nil, err