Lightpanda: the headless browser designed for AI and automation
add cors-store-entry-limit option
Muki Kiboigo4afdc412eec2
diff --git a/src/Config.zig b/src/Config.zigindex 3562346c6..9dd641380 100644--- a/src/Config.zig+++ b/src/Config.zig@@ -254,6 +254,7 @@ pub const ExperimentalFeatures = packed struct(u2) {const CommonOptions = .{.{ .name = "obey_robots", .type = bool },.{ .name = "robot_store_entry_limit", .type = ?u32, .default = 1000 },+ .{ .name = "cors_store_entry_limit", .type = ?u32, .default = 1000 },.{ .name = "proxy_bearer_token", .type = ?[:0]const u8 },.{ .name = "http_proxy", .type = ?[:0]const u8 },.{ .name = "http_max_concurrent", .type = ?u8 },@@ -570,6 +571,13 @@ pub fn robotStoreEntryLimit(self: *const Config) u32 {};}+pub fn corsStoreEntryLimit(self: *const Config) u32 {+ return switch (self.mode) {+ inline .serve, .fetch, .mcp, .agent => |opts| opts.cors_store_entry_limit.?,+ else => 1000,+ };+}+pub fn httpVersion(self: *const Config) HttpVersion {return switch (self.mode) {inline .serve, .fetch, .mcp, .agent => |opts| opts.http_version,diff --git a/src/help.zon b/src/help.zonindex 4fcf2426d..65b9d323c 100644--- a/src/help.zon+++ b/src/help.zon@@ -505,6 +505,9 @@\\ --robot-store-entry-limit <INT>\\ Maximum number of entries kept in the RobotStore. 0 means no limit.\\ Defaults to 1000.+ \\ --cors-store-entry-limit <INT>+ \\ Maximum number of entries kept in the CorsStore. 0 means no limit.+ \\ Defaults to 1000.\\ --proxy-bearer-token <TOKEN>\\ Token sent for bearer authentication with the proxy:\\ Proxy-Authorization: Bearer <token>.