kopia lustrzana https://gitlab.com/rysiekpl/libresilient
config.js.example -> config.json.example (ref. #31)
rodzic
9d6186e7f3
commit
07693eeedd
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
* LibResilient config
|
||||
*
|
||||
* This is an example config for LibResilient. When deploying LibResilient on your website
|
||||
* you will need to create your own config, using this one as a template.
|
||||
*
|
||||
*/
|
||||
|
||||
// plugins config
|
||||
self.LibResilientConfig.plugins = [{
|
||||
name: 'fetch'
|
||||
},{
|
||||
name: 'cache'
|
||||
},{
|
||||
name: 'any-of',
|
||||
uses: [{
|
||||
name: 'alt-fetch',
|
||||
// configuring the alternate endpoints plugin to use IPNS gateways
|
||||
//
|
||||
// NOTICE: we cannot use CIDv0 with gateways that use hash directly in the (sub)domain:
|
||||
// https://github.com/node-fetch/node-fetch/issues/260
|
||||
// we *can* use CIDv1 with such gateways, and that's suggested:
|
||||
// https://docs.ipfs.io/how-to/address-ipfs-on-web/#path-gateway
|
||||
// https://cid.ipfs.io/
|
||||
endpoints: [
|
||||
'https://<CIDv1>.ipns.dweb.link/', // USA
|
||||
'https://ipfs.kxv.io/ipns/<CIDv0-or-CIDv1>/', // Hong Kong
|
||||
'https://jorropo.net/ipns/<CIDv0-or-CIDv1>/', // France
|
||||
'https://gateway.pinata.cloud/ipns/<CIDv0-or-CIDv1>/', // Germany
|
||||
'https://<CIDv1>.ipns.bluelight.link/' // Singapore
|
||||
|
||||
]
|
||||
},{
|
||||
name: 'gun-ipfs',
|
||||
gunPubkey: '<your-gun-pubkey>'
|
||||
}]
|
||||
}]
|
||||
|
||||
// we need to explicitly list components we want to see debug messages from
|
||||
self.LibResilientConfig.loggedComponents = ['service-worker', 'fetch', 'cache', 'any-of', 'alt-fetch', 'gun-ipfs']
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"plugins": [{
|
||||
"name": "fetch"
|
||||
},{
|
||||
"name": "cache"
|
||||
},{
|
||||
"name": "any-of",
|
||||
"uses": [{
|
||||
"name": "alt-fetch",
|
||||
"endpoints": [
|
||||
"https://<CIDv1>.ipns.dweb.link/",
|
||||
"https://ipfs.kxv.io/ipns/<CIDv0-or-CIDv1>/",
|
||||
"https://jorropo.net/ipns/<CIDv0-or-CIDv1>/",
|
||||
"https://gateway.pinata.cloud/ipns/<CIDv0-or-CIDv1>/",
|
||||
"https://<CIDv1>.ipns.bluelight.link/"
|
||||
]
|
||||
},{
|
||||
"name": "gun-ipfs",
|
||||
"gunPubkey": "<your-gun-pubkey>"
|
||||
}]
|
||||
}],
|
||||
"loggedComponents": ["service-worker", "fetch", "cache", "any-of", "alt-fetch", "gun-ipfs"]
|
||||
}
|
Ładowanie…
Reference in New Issue