mirror of
https://github.com/opnsense/core.git
synced 2026-06-03 22:08:21 -04:00
webui - In order to allow streaming to the client, we like to prevent Lighttpd buffering our responses. This commit is a proposal to only enable streaming responses on api endpoints, as we do need to wait for the script to exit anyway. In theory we could do the same for /ui, but that's less important at the moment.
Documented in https://redmine.lighttpd.net/projects/lighttpd/wiki/Server_stream-response-bodyDetails
This commit is contained in:
parent
ff1991cdee
commit
f25e1214dc
1 changed files with 2 additions and 1 deletions
|
|
@ -433,8 +433,9 @@ EOD;
|
|||
$listener = "[{$listener}]";
|
||||
}
|
||||
$lighty_config .= "\$SERVER[\"socket\"] == \"{$listener}:{$lighty_port}\" {\n";
|
||||
$lighty_config .= "\t\$HTTP[\"url\"] =~ \"^api\" {\n\t\tserver.stream-response-body = 2\n\t}\n";
|
||||
if ($config['system']['webgui']['protocol'] == "https") {
|
||||
$lighty_config .= ' ssl.engine = "enable"' . PHP_EOL;
|
||||
$lighty_config .= "\tssl.engine = \"enable\"" . PHP_EOL;
|
||||
}
|
||||
$lighty_config .= "}\n";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue