ipfs / ipfs-webui

A frontend for an IPFS Kubo and IPFS Desktop
https://webui.ipfs.io
MIT License
1.56k stars 488 forks source link

Support POST-only HTTP API #1429

Closed lidel closed 4 years ago

lidel commented 4 years ago

PR at https://github.com/ipfs/go-ipfs/pull/7097 will block GET on /api/v0 on API port.

Seems that we need to fix ipfs-webui and release a new version so mentioned PR can be merged.

cc @hsanjuan @Stebalien

Known problems

lidel commented 4 years ago

ipfs-webui uses ipfs-redux-bundle v6.0.1 which depends on old js-ipfs-http-client v39.0.2

This is pretty bad news, as fixing it means we need to update HTTP client to the latest version (ipfs-http-client@43.0.0), which brings breaking changes made in 41.x all over the JS API: https://blog.ipfs.io/2020-02-13-js-ipfs-0-41/

I'll jump into this for an hour or two and re-evaluate if its more than that.


Sidenote: While ls is the only problem for webui, everyone using older version may stumble uppon issues when using cat get refs/local pubsub/peers pubsub/ls config/profile/list

$ rg "ky.get" v39.0.2/src

src/cat.js
23:    const res = await ky.get('cat', {

src/files-regular/refs.js
52:    const res = await ky.get('refs', {

src/files-regular/get.js
39:    const res = await ky.get('get', {

src/files-regular/refs-local.js
12:    const res = await ky.get('refs/local', {

src/files-regular/ls.js
34:    const res = await ky.get('ls', {

src/pubsub/peers.js
17:    const { Strings } = await ky.get('pubsub/peers', {

src/pubsub/ls.js
9:    const { Strings } = await ky.get('pubsub/ls', {

src/config/profiles/list.js
11:    const res = await ky.get('config/profile/list', {

I believe we should not invest time in fixing that – everyone should upgrade to async iterables version of JS API (js-ipfs-http-client >=41.x)