diff --git a/src/copcat.cpp b/src/copcat.cpp index b1bfaee..7ed9a72 100644 --- a/src/copcat.cpp +++ b/src/copcat.cpp @@ -7,16 +7,20 @@ const MString CopernicusCatalog::caturl = "https://stac.marine.copernicus.eu/met CopernicusCatalog::CopernicusCatalog() { - // Cache auto oldprefix = michlib::GPL.UsePrefix("COPERNICUS"); + // Cache cache.reset(CreateCache(michlib::GPL.ParameterSValue("Cache", ""))); - michlib::GPL.UsePrefix(oldprefix); if(!cache) { michlib::errmessage("Can't init cache"); cache.reset(new FakeCache); } + // Proxy + auto proxyurl = michlib::GPL.ParameterSValue("Proxy", ""); + if(proxyurl.Exist()) curl_easy_setopt(chandle, CURLOPT_PROXY, proxyurl.Buf()); + + michlib::GPL.UsePrefix(oldprefix); GetCatalog(); }