mirror of https://github.com/statping/statping
fix for Authorization header
parent
2638ad379d
commit
b4159359b2
|
@ -23,8 +23,7 @@ func findService(r *http.Request) (*services.Service, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
user := IsUser(r)
|
||||
if !servicer.Public.Bool && !user {
|
||||
if !servicer.Public.Bool && !IsReadAuthenticated(r) {
|
||||
return nil, errors.NotAuthenticated
|
||||
}
|
||||
return servicer, nil
|
||||
|
|
|
@ -53,6 +53,7 @@ func (c *Core) Create() error {
|
|||
MigrationId: utils.Now().Unix(),
|
||||
}
|
||||
q := db.Create(&newCore)
|
||||
utils.Log.Infof("API Key created: %s", secret)
|
||||
return q.Error()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue