Add an insecure_disable_tls_host_verification command line option

When set, this disables the host verification of all HTTP requests. Available
for both the fetch and serve mode.

Also introduced an App.Config, for future command line options which need to
be passed more deeply into the code.
This commit is contained in:
Karl Seguin
2025-03-27 18:02:30 +08:00
parent 3a1a582013
commit c6538e1038
7 changed files with 81 additions and 30 deletions

View File

@@ -213,7 +213,7 @@ fn serveHTTPS(address: std.net.Address) !void {
fn serveCDP(address: std.net.Address) !void {
const App = @import("app.zig").App;
var app = try App.init(gpa.allocator(), .serve);
var app = try App.init(gpa.allocator(), .{.run_mode = .serve});
defer app.deinit();
const server = @import("server.zig");