I'm trying to execute these commands on windows 10

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

When I try the first one on powershell, I get this error:

Error: failed to unmarshal json. invalid character '*' looking for beginning of value

so I tried with this one just in case,

./ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[\"*\"]"

which gives me another error:

Error: Unknown Command "API.HTTPHeaders.Access-Control-Allow-Origin"

What are the proper commands for above IPFS configs on windows 10 using powershell?


Using git bash on windows 10 solved the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.