You have a few options:
Have a frontend and backend architecture. Essentially 2 panels, a headless backend running Express or something serving up the fronted, and a frontend pointed to the localhost port of the backend.
Allow "file://" protocol requests to your allowed options for your API key.
Have a separate process, Node.js / Python or whatever you like, and pipe requests through there.
Also if you're interested in building panels with React, check out the Bolt CEP boilerplate: https://github.com/hyperbrew/bolt-cep
... View more