Follow this to install mitmproxy using pipx to be able to run scripts with cortex-python library
Run mitmproxy with the proxy python script
Create a file secrets.json for substituting secrets locally. The file will have all the secrets used in the cortex project. Example:
{
"secret1": "value1"
}export CORTEX_URL=<DCI URL>
export SECRETS_PATH=<HSON File path with secrets>
mitmproxy -s proxy_cortex_internal.pyConfigure proxy in python library (and cURL)
export HTTP_PROXY=localhost:8080
curl ...
OR
python ...