cedadev / cmip6-object-store

CMIP6 Object Store Library
BSD 3-Clause "New" or "Revised" License
4 stars 4 forks source link

http to https #59

Closed Mahir-Sparkess closed 3 years ago

Mahir-Sparkess commented 3 years ago

Updated urls in zarr_path to use https.

Code reference:

def http_to_https(url: str) -> str:
    url_parse = parse.urlparse(url)
    if url_parse.scheme == 'http':
        return f"https://{url_parse.netloc}{url_parse.path}"
    else:
        return url

ceda_zarr_cmip6['zarr_path'] = ceda_zarr_cmip6['zarr_path'].apply(
    lambda url: http_to_https(url)
)
agstephens commented 3 years ago

Hi @Mahir-Sparkess I have merged this. Please check it works now :-)

Mahir-Sparkess commented 3 years ago

Yep, all is good, I now pull a https link.