diff --git a/cmd/ipfs/daemon.go b/cmd/ipfs/daemon.go index 38d8bbcc0..83cf719d7 100644 --- a/cmd/ipfs/daemon.go +++ b/cmd/ipfs/daemon.go @@ -100,8 +100,8 @@ ipfs supports passing arbitrary headers to the API and Gateway. You can do this by setting headers on the API.HTTPHeaders and Gateway.HTTPHeaders keys: - ipfs config --json API.HTTPHeaders.X-Special-Header '["so special :)"]' - ipfs config --json Gateway.HTTPHeaders.X-Special-Header '["so special :)"]' + ipfs config --json API.HTTPHeaders.X-Special-Header "[\"so special :)\"]" + ipfs config --json Gateway.HTTPHeaders.X-Special-Header "[\"so special :)\"]" Note that the value of the keys is an _array_ of strings. This is because headers can have more than one value, and it is convenient to pass through @@ -111,9 +111,9 @@ CORS Headers (for API) You can setup CORS headers the same way: - ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["example.com"]' - ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]' - ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]' + ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[\"example.com\"]" + ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods "[\"PUT\", \"GET\", \"POST\"]" + ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials "[\"true\"]" Shutdown