Post
Topic
Board Wallet software
Re: blockchain.info HTTP API support for CORS?
by
enriquez
on 08/03/2014, 07:01:36 UTC
You can now add a cors=true parameter to most requests if you need the header e.g.

http://blockchain.info/unspent?cors=true

Which API calls support CORS?

I can get the "Access-Control-Allow-Origin" header back with this:
Code:
curl -v -H "Origin: http://example.com" \
  -H "Access-Control-Request-Method: GET" \
  -H "Access-Control-Request-Headers: X-Requested-With" \
  -X GET \
  "https://blockchain.info/unspent?cors=true"

This does not respond with that header:
Code:
curl -v -H "Origin: http://example.com" \
  -H "Access-Control-Request-Method: GET" \
  -H "Access-Control-Request-Headers: X-Requested-With" \
  -X GET \
  "https://blockchain.info/rawaddr/1EJcR6wPdtjYp2WYo1XPYryv9zJE1e6XtU?cors=true"

Am I doing something wrong?