about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-03-19T10·25+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-03-19T10·25+0000
commitc627fa9cbd9231e38b6c66cad5eed084a33767b5 (patch)
tree5df6db69858249c73115d28b68dab6c559efcfe9
parentabd2dcc6a362ab09faaa0dbca4e727c12c94569d (diff)
Prefer live timeseries.json
When I was first developing this, and I attempt to access
https://pomber.github.io/covid19/timeseries.json, the browser prevents me from
reading the data because it violates the same origin policy.

I'm learning more about CORS, and I'm going to try consuming this from...
https://wpcarro.dev -> https://pomber.github.io
...instead of...
http://localhost:8000 -> https://pomber.github.io
...because the http -> https protocol violates CORS.

I will not know unless I try, so... bombs away.
-rw-r--r--covid-uk/src/index.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/covid-uk/src/index.html b/covid-uk/src/index.html
index 5b2c0705b0a0..bb14426b14f8 100644
--- a/covid-uk/src/index.html
+++ b/covid-uk/src/index.html
@@ -9,7 +9,7 @@
   <script src="./node_modules/chart.js/dist/Chart.bundle.min.js"></script>
   <script>
    var timeseries =
-     fetch('./timeseries.json')
+     fetch('https://pomber.github.io/covid19/timeseries.json')
        .then(res => res.json())
        .then(createChart);