Patroneos is a great tool to protect API from a malformed json query and it works perfect under HTTP protocol on an eosio node:
curl http://mydomain.com:8887/v1/chain/get_code -X POST -d '{c}' | json_pp
OUTPUT:
{
"code" : 400,
"message" : "INVALID_JSON"
}
Simply perfect!!!
The problem I get is with HTTPS.
Under HTTPS protocol, unfortunately, I get some error; here the config.json for patroneos on HTTPS:
{
"listenIP": "0.0.0.0",
"configListenPort": "9000",
"listenPort": "8889",
"nodeosProtocol": "https",
"nodeosUrl": "mydomain.com",
"nodeosPort": "8888",
"contractBlackList": {
"currency": true
},
"maxSignatures": 10,
"maxTransactionSize": 1000000,
"maxTransactions": 32,
"headers": {
"Sample-Header": "value"
}
}
When I try to send an malformed json query, the connection is with TLSv1.3, but the given message is not the expected "invalid json" but a general system error:
curl -vvv https://mydomain.com:8889/v1/chain/get_code -X POST -d '{c}' | json_pp
OUTPUT:
..
....
* Closing connection 0
curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number
Is
"nodeosProtocol": "https"
in config.json allowed to work?
Thanks.
Giuseppe
Patroneos is a great tool to protect API from a malformed json query and it works perfect under HTTP protocol on an eosio node:
curl http://mydomain.com:8887/v1/chain/get_code -X POST -d '{c}' | json_pp
OUTPUT:
Simply perfect!!!
The problem I get is with HTTPS.
Under HTTPS protocol, unfortunately, I get some error; here the config.json for patroneos on HTTPS:
When I try to send an malformed json query, the connection is with TLSv1.3, but the given message is not the expected "invalid json" but a general system error:
curl -vvv https://mydomain.com:8889/v1/chain/get_code -X POST -d '{c}' | json_pp
OUTPUT:
Is
"nodeosProtocol": "https"in config.json allowed to work?
Thanks.
Giuseppe