Relax URLs validation
Webhook URL was not mandatory in previous versions. While it is needed if users plan to use the install webhook feature, it is not required if you want to install it yourself. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
001465d0a2
commit
86d6517a5d
2 changed files with 2 additions and 2 deletions
|
|
@ -66,7 +66,7 @@ func (u *urlsRequired) Middleware(next http.Handler) http.Handler {
|
|||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
ctrlInfo, err := u.store.ControllerInfo()
|
||||
if err != nil || ctrlInfo.WebhookURL == "" || ctrlInfo.MetadataURL == "" || ctrlInfo.CallbackURL == "" {
|
||||
if err != nil || ctrlInfo.MetadataURL == "" || ctrlInfo.CallbackURL == "" {
|
||||
w.Header().Add("Content-Type", "application/json")
|
||||
w.WriteHeader(http.StatusConflict)
|
||||
if err := json.NewEncoder(w).Encode(params.URLsRequired); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue