add cors-store-entry-limit option

This commit is contained in:
Muki Kiboigo committed 2026-09-23 07:33:14 -07:00
1 parent 744dac3a13
commit 4afdc412ee
2 files changed
+11

No files matched your search

+8
View File
@@ -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,