0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【IPFS】Proxmox で "Could not connect to the IPFS API"

Last updated at Posted at 2022-10-28

Proxmox VE で Ubuntu の LXC コンテナ上に IPFS のノードを起動し、IPFS の WebUI を開くも、 "⚠️ Could not connect to the IPFS API" と表示される。

TL; DR (今北産業)

  1. IPFS の API はデフォルトで CORS(Cross-Origin Resource Sharing)が無効になっている。
  2. API の CORS 設定で Allow-Origin を有効にする必要がある。
  3. 以下を実行後、IPFS を再起動するとアクセスできるようになります。
    ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://192.168.***.***:5001", "http://localhost:3000", "http://127.0.0.1:5001", "https://webui.ipfs.io"]'
    ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]'
    

TS; DR

落ち着いて見ると、下の方に回避策が記載されていました。。。とほほ

スクリーンショット 2022-10-28 23.27.19.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?