Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ccfos/nightingale
Browse files Browse the repository at this point in the history
  • Loading branch information
UlricQin committed Aug 2, 2023
2 parents 55d670f + ac3a5e5 commit 5b811b7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions center/center.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/ccfos/nightingale/v6/alert/astats"
"github.com/ccfos/nightingale/v6/alert/process"
"github.com/ccfos/nightingale/v6/center/cconf"
"github.com/ccfos/nightingale/v6/center/cstats"
"github.com/ccfos/nightingale/v6/center/metas"
"github.com/ccfos/nightingale/v6/center/sso"
"github.com/ccfos/nightingale/v6/conf"
Expand Down Expand Up @@ -44,6 +45,7 @@ func Initialize(configDir string, cryptoKey string) (func(), error) {
}

i18nx.Init()
cstats.Init()

db, err := storage.New(config.DB)
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions center/sso/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Port = 389
BaseDn = 'dc=example,dc=org'
BindUser = 'cn=manager,dc=example,dc=org'
BindPass = '*******'
# openldap format e.g. (&(uid=%s))
# AD format e.g. (&(sAMAccountName=%s))
AuthFilter = '(&(uid=%s))'
CoverAttributes = true
TLS = false
Expand Down
3 changes: 3 additions & 0 deletions pkg/poster/post.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ func PostJSON(url string, timeout time.Duration, v interface{}, retries ...int)
}

req, err := http.NewRequest("POST", url, bf)
if err != nil {
return
}
req.Header.Set("Content-Type", "application/json")

var resp *http.Response
Expand Down

0 comments on commit 5b811b7

Please sign in to comment.