aboutsummaryrefslogtreecommitdiff
path: root/src/routes/handler-info.zig
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2025-11-23 16:41:43 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2025-11-23 16:41:43 +0100
commit1e31b71afd1ead4644e99df6838a55481176e09a (patch)
treef1107a55f2b2f6ed838190ac259cd5b698bcc56f /src/routes/handler-info.zig
parent2e8f59aaeb731dd726f8d49d120ae4cc8a7cf512 (diff)
add fonts and create-user endpoint
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");