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 <oli@tableflip.io>
Oli Evans committed
Apr 30, 2019 at 09:26 UTC
be5d5fdca6f5dd3f73a2a2a69bb1500d679fade6
1 file changed
+5
-5
cmd/ipfs/daemon.go
+5
-5
@@ -100,8 +100,8 @@ ipfs supports passing arbitrary headers to the API and Gateway. You can
100
do this by setting headers on the API.HTTPHeaders and Gateway.HTTPHeaders
101
keys:
102
103
- ipfs config --json API.HTTPHeaders.X-Special-Header '["so special :)"]'
104
- ipfs config --json Gateway.HTTPHeaders.X-Special-Header '["so special :)"]'
103
+ ipfs config --json API.HTTPHeaders.X-Special-Header "[\"so special :)\"]"
104
+ ipfs config --json Gateway.HTTPHeaders.X-Special-Header "[\"so special :)\"]"
105
106
Note that the value of the keys is an _array_ of strings. This is because
107
headers can have more than one value, and it is convenient to pass through
@@ -111,9 +111,9 @@ CORS Headers (for API)
111
112
You can setup CORS headers the same way:
113
114
- ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["example.com"]'
115
- ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'
116
- ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'
114
+ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[\"example.com\"]"
115
+ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods "[\"PUT\", \"GET\", \"POST\"]"
116
+ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials "[\"true\"]"
117
118
Shutdown
119