Resolve HTTPS BaseURLs correctly
Created by: davemevans
Currently, BaseURL resolution is performed with a hardcoded test for BaseURL.indexOf("http://") === 0
. URLs returning true are deemed to be absolute and all others relative
When serving media from an absolute HTTPS BaseURL, these BaseURLs are therefore deemed to be relative and are resolved incorrectly.
This PR replaces the string comparison with a regex testing for (case insensitive) http or https.