xmaysonnave / tiddlywiki-ipfs

IPFS with TiddlyWiki
https://bluelightav.eth.link
GNU General Public License v3.0
54 stars 8 forks source link

Failed to retrieve an IPFS HTTP provider... #65

Closed papiche closed 2 years ago

papiche commented 2 years ago

Hi, I was trying ipfs plugin. But there is something I must have missed... I am running a local go-ipfs daemon, but when trying to save my new modifications, this message is poping

"Failed to retrieve an IPFS HTTP provider..."

Could you please help me?

papiche commented 2 years ago

OK ! Had this options on local ipfs daemon

ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'

but loading through file:// in my web browser

I found out what was the problem. strict-origin-when-cross-origin option that my browser was applying.

The solution was to go back to "download" for saving, and save as file my ipfs upgraded tiddlywiki. Then IBLOG=$(ipfs add -q tiddlywiki.html) gave me the link to it through ipfs gateway on http://127.0.0.1:8080/ipfs/$IBLOG

This time I can change my saving method and have it working !!

Thank you :heart:

NB: