Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config JSON parsing on Windows with " instead of ' #2034

Closed
SCBuergel opened this issue Dec 3, 2015 · 1 comment · Fixed by #6278
Closed

config JSON parsing on Windows with " instead of ' #2034

SCBuergel opened this issue Dec 3, 2015 · 1 comment · Fixed by #6278
Labels
help wanted Seeking public contribution on this issue topic/docs-ipfs Topic docs-ipfs

Comments

@SCBuergel
Copy link

As 'ipfs daemon --help' suggests, the cors domain can be set via

>ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'

which in Windows yields

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

The correct version should be

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

I just tested this version is and it seems Ubuntu-compatible. One might change that to the default suggestion in 'ipfs daemon --help' (and wherever else this is used).

@jbenet
Copy link
Member

jbenet commented Dec 3, 2015

i wouldn't be opposed to this

@whyrusleeping whyrusleeping added help wanted Seeking public contribution on this issue topic/docs-ipfs Topic docs-ipfs labels Aug 19, 2016
olizilla added a commit that referenced this issue Apr 30, 2019
tweak the daemon --help output to use escaped double quotes instead
of single quotes so the same command can be used on windows.

fixes: #2034

License: MIT
Signed-off-by: Oli Evans <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Seeking public contribution on this issue topic/docs-ipfs Topic docs-ipfs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants