Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: rnp on January 26, 2014, 03:51:11 AM



Title: [ABE] Request to all ALTCOINS - Please enable CORS on your blockchain API
Post by: rnp on January 26, 2014, 03:51:11 AM
Request to all ALTCOINS - Please enable CORS on your blockchain API / ABE

If you don't know what it is:
https://blockchain.info/q
Links to the Wiki page

I have tried similar requests with LiteCoin, DogeCoin, and for giggles, PotCoin, but the "cors=true" doesn't work.

Why is this useful?

Enabling CORS allows webpages to query information about an address client-side and not require a middle man to proxy.

For example, if www.example.com had a page that is willing to display transaction info, balance, stats, etc.

With CORS, this can be accomplished via Javascript in the webbrowser without problems.

Without CORS, this requires using something like www.example.com/q/getreceivedbyaddress/1DsxV1WuVsFs5r4RKJD3WgMSAtbkixfSwy , which the website then either uses their local blockchain or calls the API / ABE from the server-side.

Example:

https://blockchain.info/q/getreceivedbyaddress/1DsxV1WuVsFs5r4RKJD3WgMSAtbkixfSwy?cors=true

If you can view the headers, it includes:
access-control-allow-origin:*

I think it would be useful to have access to the API that wouldn't require a middleman script, and could be built from self-contained HTML/JS.

Input?

On Edit: Didn't expect somestupidwebsite to exist.. Changed to example.com


Title: Re: [ABE] Request to all ALTCOINS - Please enable CORS on your blockchain API
Post by: rnp on January 26, 2014, 02:46:12 PM
Bump for daytime people...


Title: Re: [ABE] Request to all ALTCOINS - Please enable CORS on your blockchain API
Post by: borntorun on September 14, 2016, 07:49:41 AM
This should be among the first things to do for an altcoin: to have a CORS enabled blockchain API. I cannot find this for many of altcoins out there and if you want to create applications including those altcoins you have to create your own node with full blockchain and API installed. This is near impossible when you want to work with 10s of altcoins.