mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
Extend further validation of config values (#8469)
- This PR allows config KVS to be validated properly without being affected by ENV overrides, rejects invalid values during set operation - Expands unit tests and refactors the error handling for notification targets, returns error instead of ignoring targets for invalid KVS - Does all the prep-work for implementing safe-mode style operation for MinIO server, introduces a new global variable to toggle safe mode based operations NOTE: this PR itself doesn't provide safe mode operations
This commit is contained in:
committed by
kannappanr
parent
599aae5ba6
commit
9e7a3e6adc
@@ -98,7 +98,7 @@ func (target *WebhookTarget) Save(eventData event.Event) error {
|
||||
if target.store != nil {
|
||||
return target.store.Put(eventData)
|
||||
}
|
||||
u, pErr := xnet.ParseURL(target.args.Endpoint.String())
|
||||
u, pErr := xnet.ParseHTTPURL(target.args.Endpoint.String())
|
||||
if pErr != nil {
|
||||
return pErr
|
||||
}
|
||||
@@ -153,7 +153,7 @@ func (target *WebhookTarget) send(eventData event.Event) error {
|
||||
|
||||
// Send - reads an event from store and sends it to webhook.
|
||||
func (target *WebhookTarget) Send(eventKey string) error {
|
||||
u, pErr := xnet.ParseURL(target.args.Endpoint.String())
|
||||
u, pErr := xnet.ParseHTTPURL(target.args.Endpoint.String())
|
||||
if pErr != nil {
|
||||
return pErr
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user