bpanel-org / bpanel

A Blockchain Management System, powered by bcoin
https://bpanel.org
Other
53 stars 23 forks source link

endpoints: add curl #158

Closed pinheadmz closed 5 years ago

pinheadmz commented 5 years ago

Creates a new bPanel API endpoint /curl which accepts two parameters host and path: '/curl/:host/:path'

Handled by curl() in clients.js, executes a bcurl.get() to fetch JSON from a remote API.

PRs will follow for bpanel-utils and price. The motivation here is to allow the bpanel client to fetch API data without CORS errors. Using this new /curl endpoint, all API requests go through the server!

pinheadmz commented 5 years ago

closing now in favor of @bpanel/curl