@decocms/apps 1.6.3 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -103,8 +103,9 @@ export function getOptimizedMediaUrl(opts: OptimizationOptions): string {
|
|
|
103
103
|
let imageSource = originalSrc.replace(DECO_CACHE_URL, "").replace(S3_URL, "").split("?")[0];
|
|
104
104
|
|
|
105
105
|
// Already on the image CDN — strip the host so we don't proxy through ourselves.
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
const cdnPrefix = `https://${imageCdnDomain}/`;
|
|
107
|
+
if (imageSource.startsWith(cdnPrefix)) {
|
|
108
|
+
imageSource = imageSource.slice(cdnPrefix.length);
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
const params = new URLSearchParams();
|