Bitcoin Forum
July 08, 2024, 06:07:50 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Pools / Re: [∞ YH] solo.ckpool.org 2% fee solo mining 268 blocks solved! on: January 29, 2023, 08:58:58 PM
Hi all, I tried looking for this answer so please forgive me.  I'm currently using solo.ckpool.org.  I'm creating a dashboard that reports stats for my miners so I can watch their status without visiting so many pools.  When I hit https://solo.ckpool.org/users/ from a browser the data comes back fine.  But when fetched through my app I get the dreaded CORS error.  Can someone point me to a CORS disabled REST API I can use or can someone turn CORS off so I can use the /users/ link?  

only you can disable it on your server/localhost...

Edit: the only time I ever had a CORS issue (wasn't with ckpool but same concept) was when I ran it locally in a browser. To get around it, I had to launch chrome with additional security disabled which I don't really recommend. I don't seem to recall having issues once I deployed it to a server.

Thanks I'm going against that URL through a React app and get the error even if I deploy it to my server.  Usually I've been able to email the owners of the requested site and they disable CORS.  I mean, if you provide an API then you shouldn't really care about CORS.  I can't seem to find the owner of solo.ckpool.org.  I just hope they are here reading posts.  Thanks for your reply though.  I agree with you, disabling security in chrome is never a good idea.  : )


I don't know how react handles it but my guess is the client it making a request to your server and is also trying to get the stat json directly from ckpool. Easiest way around it is to make your server get the json and then serve it to the client. That way, it has no clue that data is getting requested/coming from a different domain and not trigger the cors error. That's what I'm doing with my generic "dashboard" page.
2  Bitcoin / Pools / Re: [∞ YH] solo.ckpool.org 2% fee solo mining 268 blocks solved! on: January 27, 2023, 07:27:09 PM
Hi all, I tried looking for this answer so please forgive me.  I'm currently using solo.ckpool.org.  I'm creating a dashboard that reports stats for my miners so I can watch their status without visiting so many pools.  When I hit https://solo.ckpool.org/users/ from a browser the data comes back fine.  But when fetched through my app I get the dreaded CORS error.  Can someone point me to a CORS disabled REST API I can use or can someone turn CORS off so I can use the /users/ link?  

only you can disable it on your server/localhost...

Edit: the only time I ever had a CORS issue (wasn't with ckpool but same concept) was when I ran it locally in a browser. To get around it, I had to launch chrome with additional security disabled which I don't really recommend. I don't seem to recall having issues once I deployed it to a server.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!