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

API.HTTPHeaders.Access-Control-Allow-Origin Not working on Windows #6437

Closed
wissehes opened this issue Jun 12, 2019 · 3 comments
Closed

API.HTTPHeaders.Access-Control-Allow-Origin Not working on Windows #6437

wissehes opened this issue Jun 12, 2019 · 3 comments
Labels
kind/bug A bug in existing code (including security flaws) not our bug

Comments

@wissehes
Copy link

Hi all, when I execute the command ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://127.0.0.1:5001", "https://webui.ipfs.io"]' it gives me

C:\Users\<usernameee>ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://127.0.0.1:5001", "https://webui.ipfs.io"]'
Error: Unknown Command "API.HTTPHeaders.Access-Control-Allow-Origin"


USAGE
  ipfs config <key> [<value>] - Get and set ipfs config values.

  ipfs config [--bool] [--json] [--] <key> [<value>]

  'ipfs config' controls configuration variables. It works like 'git config'.
  The configuration values are stored in a config file inside your ipfs
  repository.

SUBCOMMANDS
  ipfs config edit           - Open the config file for editing in $EDITOR.
  ipfs config profile        - Apply profiles to config.
  ipfs config replace <file> - Replace the config with <file>.
  ipfs config show           - Output config file contents.

  For more information about each command, use:
  'ipfs config <subcmd> --help'

Can anyone help me with this? I'm trying to allow cross-origin (CORS) requests.

@wissehes
Copy link
Author

I'm sorry if this isn't the place to ask this

@djdv
Copy link
Contributor

djdv commented Jun 12, 2019

This is related ipfs/ipfs-webui#1008.
The problem has to do with how Windows interpreters handle quote groups.
In CMD this should do what you want.

ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "["""http://127.0.0.1:5001""", """https://webui.ipfs.io"""]"

@Stebalien Stebalien added kind/bug A bug in existing code (including security flaws) not our bug labels Jun 15, 2019
@Stebalien
Copy link
Member

Closing as an upstream bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) not our bug
Projects
None yet
Development

No branches or pull requests

3 participants