Open cprussin opened 10 months ago
In https://github.com/cloudinary/js-url-gen/blob/e1b97191fff165b6ecb353acb2477cc25a062667/src/assets/CloudinaryFile.ts#L182-L193 a cloudName setting is explicitly required. However, in https://github.com/cloudinary/js-url-gen/blob/e1b97191fff165b6ecb353acb2477cc25a062667/src/internal/url/cloudinaryURL.ts#L20-L51 the cloudName isn't actually even utilized if using a secureDistribution and privateCDN.
cloudName
secureDistribution
privateCDN
The check for cloudName should be moved into getUrlPrefix and we should only throw when omitting the cloud name for branches where it's actually utilized.
getUrlPrefix
In https://github.com/cloudinary/js-url-gen/blob/e1b97191fff165b6ecb353acb2477cc25a062667/src/assets/CloudinaryFile.ts#L182-L193 a
cloudName
setting is explicitly required. However, in https://github.com/cloudinary/js-url-gen/blob/e1b97191fff165b6ecb353acb2477cc25a062667/src/internal/url/cloudinaryURL.ts#L20-L51 thecloudName
isn't actually even utilized if using asecureDistribution
andprivateCDN
.The check for
cloudName
should be moved intogetUrlPrefix
and we should only throw when omitting the cloud name for branches where it's actually utilized.