fix: wrong registry url when index.html is present (#225)

fixes #225
This commit is contained in:
Joxit
2022-03-11 19:56:26 +01:00
parent e1fd515279
commit 126509d7fa

View File

@@ -107,7 +107,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
const registryUrl = props.registryUrl ||
(props.singleRegistry === 'true' ? undefined : (router.getUrlQueryParam() || getRegistryServers(0))) ||
(window.location.origin + window.location.pathname.replace(/\/+$/, ''));
this.state.registryUrl = registryUrl.replace(/\/$/, '');
this.state.registryUrl = registryUrl.replace(/\/$/, '').replace(/index(\.html?)?$/, '');
this.state.name = props.name || stripHttps(props.registryUrl);
this.state.catalogElementsLimit = props.catalogElementsLimit || 100000;
this.state.pullUrl = this.pullUrl(this.state.registryUrl, props.pullUrl);