mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-11-02 06:10:58 +00:00
LibWebView: Add a command line flag to enable the HTTP disk cache
This adds a RequestServerOptions structure to hold this option and the only other RS option we currently have (certificates).
This commit is contained in:
parent
3516a2344f
commit
42eaea1043
Notes:
github-actions[bot]
2025-10-14 11:41:44 +00:00
Author: https://github.com/trflynn89
Commit: 42eaea1043
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6435
4 changed files with 26 additions and 3 deletions
|
|
@ -201,17 +201,23 @@ ErrorOr<NonnullRefPtr<Web::HTML::WebWorkerClient>> launch_web_worker_process(Web
|
|||
|
||||
ErrorOr<NonnullRefPtr<Requests::RequestClient>> launch_request_server_process()
|
||||
{
|
||||
auto const& request_server_options = Application::request_server_options();
|
||||
|
||||
Vector<ByteString> arguments;
|
||||
|
||||
for (auto const& certificate : WebView::Application::browser_options().certificates)
|
||||
for (auto const& certificate : request_server_options.certificates)
|
||||
arguments.append(ByteString::formatted("--certificate={}", certificate));
|
||||
|
||||
if (request_server_options.enable_http_disk_cache == EnableHTTPDiskCache::Yes)
|
||||
arguments.append("--enable-http-disk-cache"sv);
|
||||
|
||||
if (auto server = mach_server_name(); server.has_value()) {
|
||||
arguments.append("--mach-server-name"sv);
|
||||
arguments.append(server.value());
|
||||
}
|
||||
|
||||
auto client = TRY(launch_server_process<Requests::RequestClient>("RequestServer"sv, move(arguments)));
|
||||
|
||||
WebView::Application::settings().dns_settings().visit(
|
||||
[](WebView::SystemDNS) {},
|
||||
[&](WebView::DNSOverTLS const& dns_over_tls) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue