From c723e26f8f9a55ef2d4942fccbf08b1c29760917 Mon Sep 17 00:00:00 2001 From: zzstoatzz Date: Thu, 25 Jun 2026 17:16:39 -0500 Subject: [PATCH] Fix account compatibility redirects --- src/internal/account.zig | 3 ++- src/internal/passkeys.zig | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/internal/account.zig b/src/internal/account.zig index e980921..2117a2c 100644 --- a/src/internal/account.zig +++ b/src/internal/account.zig @@ -18,9 +18,10 @@ pub fn redirectToSpaces(request: *http_api.Request) !void { fn redirect(request: *http_api.Request, location: []const u8) !void { const headers = [_]http.Header{ .{ .name = "location", .value = location }, + .{ .name = "access-control-allow-origin", .value = "*" }, .{ .name = "connection", .value = "close" }, }; - try http_api.respond(request, .see_other, "", &headers); + try http_api.respondNowClose(request, .see_other, "", &headers); } const html_headers = [_]http.Header{ diff --git a/src/internal/passkeys.zig b/src/internal/passkeys.zig index 6897f9b..6ff9337 100644 --- a/src/internal/passkeys.zig +++ b/src/internal/passkeys.zig @@ -44,9 +44,10 @@ pub fn verifyAssertionSignature(credential_public_key: []const u8, signature_der pub fn redirectToSecurity(request: *http_api.Request) !void { const headers = [_]http.Header{ .{ .name = "location", .value = "/account/security" }, + .{ .name = "access-control-allow-origin", .value = "*" }, .{ .name = "connection", .value = "close" }, }; - try http_api.respond(request, .see_other, "", &headers); + try http_api.respondNowClose(request, .see_other, "", &headers); } pub fn adminSessionsPage(request: *http_api.Request) !void { -- 2.51.2