|
@@ -156,6 +156,7 @@ WebServerService::WebServerService(const WebServerServiceConfig& config)
|
|
|
HttpServerConfig http_config;
|
|
HttpServerConfig http_config;
|
|
|
http_config.port = config_.http_port;
|
|
http_config.port = config_.http_port;
|
|
|
http_config.static_files_path = config_.static_files_path;
|
|
http_config.static_files_path = config_.static_files_path;
|
|
|
|
|
+ http_config.max_upload_mb = config_.max_upload_mb;
|
|
|
http_server_ = std::make_unique<HttpServer>(http_config);
|
|
http_server_ = std::make_unique<HttpServer>(http_config);
|
|
|
|
|
|
|
|
// Initialize WebSocket server on separate port
|
|
// Initialize WebSocket server on separate port
|
|
@@ -188,6 +189,15 @@ WebServerServiceConfig WebServerService::loadConfig(const std::filesystem::path&
|
|
|
config.database_address = cfg.getOr<std::string>("database_address", "localhost:9004");
|
|
config.database_address = cfg.getOr<std::string>("database_address", "localhost:9004");
|
|
|
config.database_project = cfg.getOr<std::string>("database_project", "smartbotic-automation");
|
|
config.database_project = cfg.getOr<std::string>("database_project", "smartbotic-automation");
|
|
|
|
|
|
|
|
|
|
+ // HttpServer already enforced a body cap before this - a hardcoded
|
|
|
|
|
+ // 16 MB literal at the point it constructs httplib::Server - so this
|
|
|
|
|
+ // is not closing an open door, it is making that cap configurable
|
|
|
|
|
+ // and raising it. The default goes from 16 MB to 32 MB because an
|
|
|
|
|
+ // upload node needs to carry up to a 16 MB image field, and that
|
|
|
|
|
+ // field cannot fit inside a 16 MB total body once multipart framing
|
|
|
|
|
+ // is added on top.
|
|
|
|
|
+ config.max_upload_mb = cfg.getOr<int>("server.max_upload_mb", 32);
|
|
|
|
|
+
|
|
|
// Runner config
|
|
// Runner config
|
|
|
config.runner_config.heartbeat_timeout_sec =
|
|
config.runner_config.heartbeat_timeout_sec =
|
|
|
cfg.getOr<int>("runners.heartbeat_timeout_sec", 30);
|
|
cfg.getOr<int>("runners.heartbeat_timeout_sec", 30);
|