Bitcoin Forum
March 28, 2024, 10:41:07 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: blockchain.info HTTP API support for CORS?  (Read 3697 times)
w1R903 (OP)
Full Member
***
Offline Offline

Activity: 218
Merit: 100


View Profile
April 05, 2013, 03:05:47 PM
 #1

It would be absolutely awesome if blockchain.info could support CORS:

Access-Control-Allow-Origin: *

It would allow client-side projects to access the blockchain.info API without having to resort to hacks like using YQL.

4096R/F5EA0017
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1711665667
Hero Member
*
Offline Offline

Posts: 1711665667

View Profile Personal Message (Offline)

Ignore
1711665667
Reply with quote  #2

1711665667
Report to moderator
1711665667
Hero Member
*
Offline Offline

Posts: 1711665667

View Profile Personal Message (Offline)

Ignore
1711665667
Reply with quote  #2

1711665667
Report to moderator
whydifficult
Sr. Member
****
Offline Offline

Activity: 287
Merit: 250



View Profile WWW
April 21, 2013, 05:28:45 PM
 #2

You could try to use corsproxy

Not sure about the load it can handle though.

Gekko a nodejs bitcoin trading bot!
Realtime Bitcoin Globe - visualizing all transactions and blocks
Tip jar (BTC): 1KyQdQ9ctjCrGjGRCWSBhPKcj5omy4gv5S
bitpop
Legendary
*
Offline Offline

Activity: 2912
Merit: 1060



View Profile WWW
May 02, 2013, 11:48:32 AM
 #3

Damn could've used this when s3 couldn't serve fonts

piuk
Hero Member
*****
Offline Offline

Activity: 910
Merit: 1005



View Profile WWW
May 07, 2013, 11:03:36 PM
 #4

What is the intended usage?

bitpop
Legendary
*
Offline Offline

Activity: 2912
Merit: 1060



View Profile WWW
May 08, 2013, 12:10:24 AM
 #5

I'm assuming ajaxing the feeds

piuk
Hero Member
*****
Offline Offline

Activity: 910
Merit: 1005



View Profile WWW
May 15, 2013, 04:36:22 PM
 #6

You can now add a cors=true parameter to most requests if you need the header e.g.

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

w1R903 (OP)
Full Member
***
Offline Offline

Activity: 218
Merit: 100


View Profile
May 28, 2013, 02:54:51 PM
 #7

You can now add a cors=true parameter to most requests if you need the header e.g.

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

Great, thanks so much!

4096R/F5EA0017
enriquez
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
March 08, 2014, 07:01:36 AM
 #8

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?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!