637 {
639 cfg.add_options()
641 "The filename (relative to data-dir) to create a unix socket for HTTP RPC; set blank to disable.");
642 else
643 cfg.add_options()
644 ("unix-socket-path", bpo::value<string>(),
645 "The filename (relative to data-dir) to create a unix socket for HTTP RPC; set blank to disable.");
646
648 cfg.add_options()
649 (
"http-server-address", bpo::value<string>()->default_value(
"127.0.0.1:" + std::to_string(current_http_plugin_defaults.
default_http_port)),
650 "The local IP and port to listen for incoming http connections; set blank to disable.");
651 else
652 cfg.add_options()
653 ("http-server-address", bpo::value<string>(),
654 "The local IP and port to listen for incoming http connections; leave blank to disable.");
655
656 cfg.add_options()
657 ("https-server-address", bpo::value<string>(),
658 "The local IP and port to listen for incoming https connections; leave blank to disable.")
659
660 ("https-certificate-chain-file", bpo::value<string>(),
661 "Filename with the certificate chain to present on https connections. PEM format. Required for https.")
662
663 ("https-private-key-file", bpo::value<string>(),
664 "Filename with https private key in PEM format. Required for https")
665
666 (
"https-ecdh-curve", bpo::value<https_ecdh_curve_t>()->notifier([
this](
https_ecdh_curve_t c) {
667 my->https_ecdh_curve = c;
669 "Configure https ECDH curve to use: secp384r1 or prime256v1")
670
671 ("access-control-allow-origin", bpo::value<string>()->notifier([this](const string& v) {
672 my->access_control_allow_origin = v;
673 fc_ilog(
logger,
"configured http with Access-Control-Allow-Origin: ${o}",
674 ("o", my->access_control_allow_origin) );
675 }),
676 "Specify the Access-Control-Allow-Origin to be returned on each request.")
677
678 ("access-control-allow-headers", bpo::value<string>()->notifier([this](const string& v) {
679 my->access_control_allow_headers = v;
680 fc_ilog(
logger,
"configured http with Access-Control-Allow-Headers : ${o}",
681 ("o", my->access_control_allow_headers) );
682 }),
683 "Specify the Access-Control-Allow-Headers to be returned on each request.")
684
685 ("access-control-max-age", bpo::value<string>()->notifier([this](const string& v) {
686 my->access_control_max_age = v;
687 fc_ilog(
logger,
"configured http with Access-Control-Max-Age : ${o}",
688 ("o", my->access_control_max_age) );
689 }),
690 "Specify the Access-Control-Max-Age to be returned on each request.")
691
692 ("access-control-allow-credentials",
693 bpo::bool_switch()->notifier([this](bool v) {
694 my->access_control_allow_credentials = v;
695 if( v )
fc_ilog(
logger,
"configured http with Access-Control-Allow-Credentials: true" );
696 })->default_value(false),
697 "Specify if Access-Control-Allow-Credentials: true should be returned on each request.")
698 ("max-body-size", bpo::value<uint32_t>()->default_value(my->max_body_size),
699 "The maximum body size in bytes allowed for incoming RPC requests")
700 ("http-max-bytes-in-flight-mb", bpo::value<int64_t>()->default_value(500),
701 "Maximum size in megabytes http_plugin should use for processing http requests. -1 for unlimited. 429 error response when exceeded." )
702 ("http-max-response-time-ms", bpo::value<uint32_t>()->default_value(30),
703 "Maximum time for processing a request.")
704 ("verbose-http-errors", bpo::bool_switch()->default_value(false),
705 "Append the error log to HTTP responses")
706 ("http-validate-host", boost::program_options::value<bool>()->default_value(true),
707 "If set to false, then any incoming \"Host\" header is considered valid")
708 ("http-alias", bpo::value<std::vector<string>>()->composing(),
709 "Additionaly acceptable values for the \"Host\" header of incoming HTTP requests, can be specified multiple times. Includes http/s_server_address by default.")
710 ("http-threads", bpo::value<uint16_t>()->default_value( my->thread_pool_size ),
711 "Number of worker threads in http thread pool")
712 ;
713 }
string default_unix_socket_path
uint16_t default_http_port