0

I know that CORS will pass by servers, but as I did a ticket for this to my API provider, they said " You can try to set the request header Origin to https://api-swap-rest.bingbon.pro. "

How should I do this in React via AXIOS?

I Tested this but didn't workout :

axios.defaults.headers.common['Access-Control-Allow-Origin'] = "https://api-swap-rest.bingbon.pro"

axios.get(`https://api-swap-rest.bingbon.pro/api/v1/market/getLatestFunding?symbol=BTC-USDT`).then((data) => console.log(data)).catch((err) => console.log(err))
Skinny
  • 3
  • 5

0 Answers0