Stored the isCdnUrl in a variable

Prevent parsing the url every time as this value will not change