Browse Source

Remove API proxy and use new remote endpoint with CORS header

pull/1/head
Luke Childs 6 years ago
parent
commit
bed210a1d5
  1. 2
      js/get-coin-data.js
  2. 5
      netlify.toml

2
js/get-coin-data.js

@ -6,7 +6,7 @@ const HOURS = MINUTES * 60;
const getCoinData = async () => {
// Fetch coin data
const response = await fetch('https://cors.io/?https://www.crypto51.app/coins.json');
const response = await fetch('https://api.crypto51.app/coins.json');
let {coins} = await response.json();
// Format

5
netlify.toml

@ -1,5 +0,0 @@
[[redirects]]
from = "/api/*"
to = "https://www.crypto51.app/:splat"
status = 200
headers = {Access-Control-Allow-Origin = "*"}
Loading…
Cancel
Save