diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-11-23 16:41:43 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-11-23 16:41:43 +0100 |
| commit | 1e31b71afd1ead4644e99df6838a55481176e09a (patch) | |
| tree | f1107a55f2b2f6ed838190ac259cd5b698bcc56f /src/routes/handler-info.zig | |
| parent | 2e8f59aaeb731dd726f8d49d120ae4cc8a7cf512 (diff) | |
add fonts and create-user endpoint
Diffstat (limited to 'src/routes/handler-info.zig')
| -rw-r--r-- | src/routes/handler-info.zig | 10 |
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"); |