Skip to content

Commit

Permalink
Merge pull request #6278 from ipfs/windows-friendly-deamon-help
Browse files Browse the repository at this point in the history
fix: windows friendly daemon help
  • Loading branch information
Stebalien authored Apr 30, 2019
2 parents dd16b3c + be5d5fd commit 807f45e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/ipfs/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 807f45e

Please sign in to comment.