Skip to content

Commit

Permalink
Merge branch 'main' into fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kpetremann authored Feb 20, 2024
2 parents e458a61 + 745bfe6 commit e55a571
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion internal/api/auth/basic_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (b *BasicAuth) Wrap(next httprouter.Handle) httprouter.Handle {
case ldapMode:
return BasicAuthLDAP(b.ldapAuth, next)
default:
return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
return func(w http.ResponseWriter, _ *http.Request, _ httprouter.Params) {
log.Error().Str("auth-method", string(b.mode)).Str("authentication issue", "bad server configuration").Send()
http.Error(w, "authentication issue: bad server configuration", http.StatusInternalServerError)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/api/router/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func getVersion(w http.ResponseWriter, _ *http.Request, _ httprouter.Params) {
}

func prometheusMetrics(h http.Handler) httprouter.Handle {
return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
return func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
h.ServeHTTP(w, r)
}
}
Expand Down
11 changes: 7 additions & 4 deletions settings.example.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Datacenter: "europe"
LogLevel: "error"

API:
ListenAddress: "127.0.0.1"
Expand All @@ -11,17 +10,21 @@ Log:

Authentication:
LDAP:
InsecureSkipVerify: "false"
URL: "ldaps://URL.local"
BindDN: "cn=<user>,OU=<ou>,DC=<local>"
BaseDN: "DC=<local>"
Password: "<some_password>"
MaxWorkers: 10
WorkersCount: 10
Timeout: 5s
MaxConnectionLifetime: 1m
InsecureSkipVerify: false

NetBox:
URL: "https://netbox.local"
APIKey: "<some_key>"
DatacenterFilterKey: "site_group"
LimitPerPage: 500

Build:
Interval: "30m"
Interval: "30m"
AllDevicesMustBuild: false

0 comments on commit e55a571

Please sign in to comment.