EOA-team / eodal

Earth Observation Data Analysis Library
https://eodal.readthedocs.io/en/latest/
GNU General Public License v3.0
93 stars 15 forks source link

Pystac client behind proxy server #28

Closed lukasValentin closed 1 year ago

lukasValentin commented 1 year ago

This merge request implements and resolves #27.

To make use of the new entry STAC_API_IO_CA_BUNDLE you have to set the variable to the value of either CURL_CA_BUNDLE or REQUESTS_CA_BUNDLE or a custom file path to a certificate bundle when working behind a proxy server with custom certificate before making a STAC requests (i.e., using the Mapper with Settings.USE_STAC == True):

from eodal.config import get_settings
import os

Settings = get_settings()
Settings.STAC_API_IO_CA_BUNDLE = os.environ.get('CURL_CA_BUNDLE')

This does not apply when there's no self-signed certificate. In this case you can continue working as usual and no modifications in the code are required.