diff --git a/app/portainer/components/forms/registry-form-custom/registry-form-custom.html b/app/portainer/components/forms/registry-form-custom/registry-form-custom.html index fc9f4da1e..7081aff7c 100644 --- a/app/portainer/components/forms/registry-form-custom/registry-form-custom.html +++ b/app/portainer/components/forms/registry-form-custom/registry-form-custom.html @@ -30,7 +30,7 @@
diff --git a/app/portainer/models/registry.js b/app/portainer/models/registry.js index 54bf040c2..a87bf1b1f 100644 --- a/app/portainer/models/registry.js +++ b/app/portainer/models/registry.js @@ -51,6 +51,7 @@ export function RegistryCreateRequest(model) { this.Name = model.Name; this.Type = model.Type; this.URL = _.replace(model.URL, /^https?\:\/\//i, ''); + this.URL = _.replace(this.URL, /\/$/, ''); this.Authentication = model.Authentication; if (model.Authentication) { this.Username = model.Username; diff --git a/app/portainer/services/api/registryService.js b/app/portainer/services/api/registryService.js index d1468c91e..183cfc943 100644 --- a/app/portainer/services/api/registryService.js +++ b/app/portainer/services/api/registryService.js @@ -62,6 +62,8 @@ angular.module('portainer.app').factory('RegistryService', [ }; service.updateRegistry = function (registry) { + registry.URL = _.replace(registry.URL, /^https?\:\/\//i, ''); + registry.URL = _.replace(registry.URL, /\/$/, ''); return Registries.update({ id: registry.Id }, registry).$promise; }; diff --git a/app/portainer/views/registries/edit/registry.html b/app/portainer/views/registries/edit/registry.html index 4ddcb569d..011afb5ea 100644 --- a/app/portainer/views/registries/edit/registry.html +++ b/app/portainer/views/registries/edit/registry.html @@ -22,7 +22,10 @@