What's the purpose to have Options -r
in cleos
?
in version v1.1.3, there is a -r
or --header
:
pass specific HTTP header, repeat this option to pass multiple headers
Is there any example to demonstrate how header works?
EOS.IO Stack Exchange is a question and answer site for users and developers of distributed applications built on top of the blockchain operating system, EOS.IO. It only takes a minute to sign up.
Sign up to join this communityAn explanation is provided in the pull request:
In some scenarios, 'nodeos' runs remotely from where 'cleos' locates, that implies the communication between the two parties should go across the network. So a new option '-r,--header' is proposed in this PR to allow user to customized the HTTP request headers sent by 'cleos' in case that some 'middle' devices may require for specific headers to contain some 'token'.
And also, if 'nodeos' is set up to provide HTTPS APIs, say by placing a reverse proxy in front, in many cases, especially for some testing environments, there might not be domains assigned with the 'nodeos' - so 'cleos' needs a way to 'tolerate' with the invalid certificates. To address this, a new option '-n,--no-verify' is proposed in this PR too, to disable the peer verification for current secure connection.