mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 12:44:43 +00:00
Centralizes configuration, eliminates unnecessary copying of config
This commit is contained in:
@@ -58,11 +58,16 @@ pub fn main() !void {
|
||||
defer writer.deinit();
|
||||
|
||||
lp.log.opts.level = .warn;
|
||||
var app = try lp.App.init(allocator, .{
|
||||
.run_mode = .serve,
|
||||
.tls_verify_host = false,
|
||||
.user_agent = "User-Agent: Lightpanda/1.0 internal-tester",
|
||||
});
|
||||
const config = lp.Config{
|
||||
.mode = .{ .serve = .{
|
||||
.common = .{
|
||||
.tls_verify_host = false,
|
||||
.user_agent_suffix = "internal-tester",
|
||||
},
|
||||
} },
|
||||
.exec_name = "lightpanda-wpt",
|
||||
};
|
||||
var app = try lp.App.init(allocator, &config);
|
||||
defer app.deinit();
|
||||
|
||||
var browser = try lp.Browser.init(app, .{});
|
||||
|
||||
Reference in New Issue
Block a user