Created
September 16, 2018 17:59
-
-
Save patientplatypus/a4adc9d1ae69fa7b3c67843ae8bab935 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this was working before: | |
this.msgNode = new IPFS({ repo: String('msg' + Math.random() + Date.now()) }) | |
And now, without me changing my code, I am getting the error: | |
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at | |
https://node1.preload.ipfs.io/api/v0/refs?r=true&arg=QmZkqQ2yNTRwqxZK9Bj5x5zaCzyZWoRjbvfUE6tzNp7uej. | |
(Reason: CORS header ‘Access-Control-Allow-Origin’ missing).[Learn More] | |
Here is my config file: https://gist.github.com/patientplatypus/1e3fe4c48375d5a4fc4b058168f4b988. | |
You can see that I have access-allow-origin: "*" so I should not be seeing this error. | |
So now, I've tried two other methods: | |
In one I use bootstrap, without ams-1, in the other I use my own webp2p (and I made sure I have the rendezvous | |
server up and running). | |
Neither way is working. | |
this.msgNode = new IPFS({ | |
repo: String('msg' + Math.random() + Date.now()), | |
EXPERIMENTAL: { | |
pubsub: false | |
}, | |
config: { | |
"Bootstrap": [ | |
"/dns4/lon-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLMeWqB7YGVLJN3pNLQpmmEk35v6wYtsMGLzSr5QBU3", | |
"/dns4/sfo-3.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM", | |
"/dns4/sgp-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu", | |
"/dns4/nyc-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLueR4xBeUbY9WZ9xGUUxunbKWcrNFTDAadQJmocnWm", | |
"/dns4/nyc-2.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64" | |
], | |
} | |
}) | |
this.canvasNode = new IPFS({ | |
repo: String('canvas' + Math.random() + Date.now()), | |
EXPERIMENTAL: { | |
pubsub: false | |
}, | |
config: { | |
Addresses: { | |
Swarm: [ | |
'/ip4/127.0.0.1/tcp/9090/ws/p2p-websocket-star' | |
// '/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star' | |
] | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment