Skip to content

Commit

Permalink
#22 change storage from ipfs to github - just pull from the root of t…
Browse files Browse the repository at this point in the history
…he repo for now

ipfs.io was taking ages to grab the file AND I can't be arsed setting up a persistent daemon right now
  • Loading branch information
Chris Hatch committed Oct 16, 2017
1 parent c672c6e commit fc5f2e3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
3 changes: 3 additions & 0 deletions banner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"message": null
}
13 changes: 12 additions & 1 deletion config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,12 @@ module.exports = {
handler: 'cacheFirst',
options: {
cache: {
name: 'price-cache',
name: 'directory-cache',
maxAgeSeconds: 2 * 24 * 60 * 60
},
},
},

{ // Cache price updates for 5 minutes
urlPattern: /^https:\/\/api\.coinmarketcap\.com\/v1\/ticker\/stellar\//,
handler: 'cacheFirst',
Expand All @@ -363,6 +364,16 @@ module.exports = {
},
},
},
{ // Cache sponsored link banner fetches for 6 hours
urlPattern: /^https:\/\/raw.githubusercontent.com\/chatch\/stellarexplorer\/master\/banner.json/,
handler: 'cacheFirst',
options: {
cache: {
name: 'banner-cache',
maxAgeSeconds: 6 * 60 * 60
},
},
},
]
}),
// Moment.js is an extremely popular library that bundles large locale files
Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/SponsoredLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import FetchPonyfill from 'fetch-ponyfill'
const fetch = FetchPonyfill().fetch

const SPONSOR_LINK_JSON =
'https://ipfs.io/ipns/QmR4utZqnjJfteRLQrLNtBTXPd6HRqhc5qh5uLXVJY2ZyW'
'https://raw.githubusercontent.com/chatch/stellarexplorer/master/banner.json'

const SponsoredLink = ({link}) =>
<Grid>
Expand Down

0 comments on commit fc5f2e3

Please sign in to comment.