aboutsummaryrefslogtreecommitdiff
path: root/src/routes/handler-info.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/handler-info.zig')
-rw-r--r--src/routes/handler-info.zig10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/routes/handler-info.zig b/src/routes/handler-info.zig
index 5183628..9e10bd5 100644
--- a/src/routes/handler-info.zig
+++ b/src/routes/handler-info.zig
@@ -122,6 +122,11 @@ pub fn handle(
.value = context.response.headers.content_type
});
+ try headers.append(allocator, .{
+ .name = "Service-Worker-Allowed",
+ .value = "/",
+ });
+
if (context.response.headers.fingerprint) |auth_token| {
var value = std.Io.Writer.Allocating.init(arena.allocator());
@@ -176,7 +181,10 @@ fn HandlerWrapper(T: type, name: []const u8) type {
ctx.allocator,
writer.written(),
.{},
- ) catch return error.BadRequest;
+ ) catch |err| {
+ log.warn("failed to parse JSON {}", .{err});
+ return error.BadRequest;
+ };
break :args .{ ctx, body };
} else {
@compileError("invalid amount of arguments for request function");