From e7a6aa5f04b9c1d70f5f93370acc61b2994fc61a Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Fri, 20 Oct 2023 22:44:30 -0700 Subject: [PATCH] allow cloudflare to be used for zig build --- src/universal_lambda.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/universal_lambda.zig b/src/universal_lambda.zig index 0d6f410..07ba9d1 100644 --- a/src/universal_lambda.zig +++ b/src/universal_lambda.zig @@ -12,7 +12,10 @@ const FakeResponse = struct { }, }; pub const Context = union(enum) { - web_request: if (build_options.build_type == .exe_run) *FakeResponse else *std.http.Server.Response, + web_request: switch (build_options.build_type) { + .exe_run, .cloudflare => *FakeResponse, + else => *std.http.Server.Response, + }, flexilib: struct { request: flexilib.ZigRequest, response: flexilib.ZigResponse,