mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-10-08 12:21:44 -04:00
add cors-store-entry-limit option
This commit is contained in:
2 files changed
+11
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user