Lightpanda: the headless browser designed for AI and automation
add origin header in CorsGate on cross origin
Muki Kiboigof428dc8e52bd
diff --git a/src/network/CorsGate.zig b/src/network/CorsGate.zigindex eb20d5dda..8b2ccab5e 100644--- a/src/network/CorsGate.zig+++ b/src/network/CorsGate.zig@@ -114,11 +114,13 @@ pub fn check(self: *CorsGate, transfer: *Transfer) !Result {}transfer._cors_cross_origin = true;+ const origin = req.origin orelse "null";+ try transfer.setHeader("Origin", origin, .{});if (!requiresPreflight(transfer)) {log.debug(.cors, "cross origin", .{.url = req.url,- .origin = req.origin orelse "null",+ .origin = origin,.preflight = false,});return .allowed;