This repository was archived by the owner on Mar 10, 2020. It is now read-only.
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
setting cors via environment variable does not work in windows #156
Closed
Description
You suggest setting the cors domain via an environment variable in https://github.com/ipfs/js-ipfs-api#cors. The windows version of this does not work since 'ipfs daemon' seems to not correctly read this variable. Since it is possible to do the same via config settings I'd suggest to use this method in all OSes, call the following before starting the daemon:
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[\"*\"]"
Unless there are no major limitations this would make the behavior more reliable across systems.