Skip to content

Commit

Permalink
feat: add windows cmd & powershell init scripts (#1496)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelramalho19 authored May 21, 2020
1 parent a28b940 commit 9c89d6d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/welcome/WelcomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,22 @@ const ConnectionStatus = ({ t, connected, sameOrigin }) => {
<Trans i18nKey='notConnected.paragraph2'>
<p>Make sure you <a className='link blue' href='https://github.com/ipfs-shipyard/ipfs-webui#configure-ipfs-api-cors-headers'>configure your IPFS API</a> to allow cross-origin (CORS) requests, running the commands below:</p>
</Trans>
<Shell>
<Shell title="Unix & MacOS">
<code className='db'><b className='no-select'>$ </b>ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '[{addOrigin && `"${origin}", `}"{defaultDomains.join('", "')}"]'</code>
<code className='db'><b className='no-select'>$ </b>ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]'</code>
</Shell>
<Shell title="Windows Powershell" className="mt4">
<code className='db'><b className='no-select'>$ </b>ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '[{addOrigin && `\\"${origin}\\", `}\"{defaultDomains.join('\\", \\"')}\"]'</code>
<code className='db'><b className='no-select'>$ </b>ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\"]'</code>
</Shell>
<Shell title="Windows CMD" className="mt4">
<code className='db'><b className='no-select'>$ </b>ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[{addOrigin && `"""${origin}""", `}"""{defaultDomains.join('""", """')}"""]"</code>
<code className='db'><b className='no-select'>$ </b>ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods "["""PUT""", """POST"""]"</code>
</Shell>
</div>
)}
<Trans i18nKey='notConnected.paragraph3'>
<p>Start an IPFS daemon in a terminal:</p>
<p>Then, start/restart the IPFS daemon in a terminal:</p>
</Trans>
<Shell>
<code className='db'><b className='no-select'>$ </b>ipfs daemon</code>
Expand Down

0 comments on commit 9c89d6d

Please sign in to comment.