Skip to content
This repository was archived by the owner on Apr 15, 2024. It is now read-only.

Latest commit

 

History

History
26 lines (21 loc) · 756 Bytes

File metadata and controls

26 lines (21 loc) · 756 Bytes

Setup proxy with script to intercept internal API calls

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.py

Configure proxy in python library (and cURL)

export HTTP_PROXY=localhost:8080
curl ...
OR
python ...