API shell text does not apply to Windows
See original GitHub issueDescribe the bug When failing to connect to the daemon, the webui shows shell prompts that are invalid on Windows.
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://127.0.0.1:8080", "http://127.0.0.1:5001", "https://webui.ipfs.io"]'
returns these messages in:
- PowerShell:
Error: failed to unmarshal json. invalid character 'h' looking for beginning of value
- CMD:
Error: Unknown Command "API.HTTPHeaders.Access-Control-Allow-Origin"
Valid forms of this are:
- PowerShell:
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '[\"http://127.0.0.1:8080\", \"http://127.0.0.1:5001\", \"https://webui.ipfs.io\"]' ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"GET\", \"POST\"]'
- CMD:
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "["""http://127.0.0.1:8080""", """http://127.0.0.1:5001""", """https://webui.ipfs.io"""]" ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods "["""PUT""", """GET""", """POST"""]"
It would be nice if the shell element had some way to select what command shell you’re using, and formatted the string so the arguments matched the escape type.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
cURL POST command line on WINDOWS RESTful service
My problem: Using the command line tool to curl my localhost server while sending some data along with my POST request is not...
Read more >Windows Terminal Troubleshooting | Microsoft Learn
Learn fixes to common obstacles in Windows Terminal.
Read more >ShellExecuteExW function (shellapi.h) - Win32 - Microsoft Learn
Performs an operation on a specified file. (ShellExecuteExW)
Read more >The Windows Shell - Win32 apps | Microsoft Learn
Specifies application information to return from IShellApp::GetAppInfo. These flags are bitmasks used in the dwMask member of the APPINFODATA ...
Read more >Introducing the Windows Pseudo Console (ConPTY)
Text emitted by the application is sent to the slave and is then ... Runs as usual, reading input and calling Console APIs...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You are a hero ♥
Hi there, I tried both (Windows 11)
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '[\"true\"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials "["""true"""]"
And I get in both casesI also tried all forms of adding the config file
But I get the same error. Any ideas?