Merge pull request #2487 from navidemad/feat/external-stylesheets-flag

Add --enable-external-stylesheets flag with fetch + parse
This commit is contained in:
Pierre Tachoire
2026-05-20 13:41:59 +02:00
committed by GitHub
12 changed files with 499 additions and 2 deletions

View File

@@ -100,6 +100,7 @@ const CommonOptions = .{
.{ .name = "storage_sqlite_path", .type = ?[:0]const u8 },
.{ .name = "disable_subframes", .type = bool },
.{ .name = "disable_workers", .type = bool },
.{ .name = "enable_external_stylesheets", .type = bool },
};
fn dumpValidator(_: Allocator, args: *std.process.ArgIterator) !?DumpFormat {
@@ -255,6 +256,13 @@ pub fn disableWorkers(self: *const Config) bool {
};
}
pub fn enableExternalStylesheets(self: *const Config) bool {
return switch (self.mode) {
inline .serve, .fetch, .mcp => |opts| opts.enable_external_stylesheets,
else => unreachable,
};
}
pub fn httpProxy(self: *const Config) ?[:0]const u8 {
return switch (self.mode) {
inline .serve, .fetch, .mcp => |opts| opts.http_proxy,