You are viewing a single comment's thread from:

RE: IPFS实用指南

in #starnote5 years ago
//需要改动的地方
"Addresses": {
    "API": "/ip4/127.0.0.1/tcp/9000",
    "Announce": [],
    "Gateway": "/ip4/127.0.0.1/tcp/8080",
"StorageMax": "80GB"

//在控制台粘入以下6条命令
ipfs config Addresses.Gateway /ip4/127.0.0.1/tcp/8080  //访问接口
ipfs config Addresses.API /ip4/127.0.0.1/tcp/9000    //上传接口
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT","GET", "POST", "OPTIONS"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Headers '["Authorization"]'
ipfs config --json API.HTTPHeaders.Access-Control-Expose-Headers '["Location"]'