From be5d5fdca6f5dd3f73a2a2a69bb1500d679fade6 Mon Sep 17 00:00:00 2001 From: Oli Evans Date: Tue, 30 Apr 2019 09:26:09 +0100 Subject: [PATCH] fix: windows friendly daemon help 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 --- cmd/ipfs/daemon.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/ipfs/daemon.go b/cmd/ipfs/daemon.go index 38d8bbcc020..83cf719d75b 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