fix: CORS issue on url ending whith slash and export demo server

This commit is contained in:
Joxit
2021-07-04 00:03:47 +02:00
parent 1dc84eb46e
commit 026f65abc6
93 changed files with 14 additions and 96 deletions

View File

@@ -98,7 +98,7 @@ export class DockerImage {
oReq.addEventListener('loadend', function () {
if (this.status == 200 || this.status == 202) {
const response = JSON.parse(this.responseText);
if (response.mediaType === 'application/vnd.docker.distribution.manifest.list.v2+json') {
if (response.mediaType === 'application/vnd.docker.distribution.manifest.list.v2+json' && !response.layers) {
self.trigger('list', response);
const manifest = response.manifests[0];
const image = new DockerImage(self.name, manifest.digest, { ...self.opts, list: false });