2021-01-04 22:49:28 +01:00
|
|
|
// Copyright 2021 Frédéric Guillot. All rights reserved.
|
|
|
|
// Use of this source code is governed by the Apache 2.0
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package validator // import "miniflux.app/validator"
|
|
|
|
|
|
|
|
import "miniflux.app/model"
|
|
|
|
|
|
|
|
// ValidateSubscriptionDiscovery validates subscription discovery requests.
|
|
|
|
func ValidateSubscriptionDiscovery(request *model.SubscriptionDiscoveryRequest) *ValidationError {
|
2021-02-08 03:38:45 +01:00
|
|
|
if !IsValidURL(request.URL) {
|
2021-01-04 22:49:28 +01:00
|
|
|
return NewValidationError("error.invalid_site_url")
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|