Skip to content

Commit

Permalink
WIP - just putting down some ideas first
Browse files Browse the repository at this point in the history
  • Loading branch information
zigster64 committed Aug 12, 2024
1 parent 1721cf1 commit 3fb0a36
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/cookie.zig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const std = @import("std");

const Allocator = std.mem.Allocator;

pub const sameSiteMode = enum {
None,
Lax,
Strict,
};

pub const Cookie = struct {
name: []const u8,
value: []const u8,
path: ?[]const u8 = null,
domain: ?[]const u8 = null,
maxAge: usize = 0, // 0 - none specified. < 0 = delete cookie now. > 0 = max age in seconds
secure: bool = true,
session: bool = false,
httpOnly: bool = true,
sameSite: sameSiteMode = .Default,
};

0 comments on commit 3fb0a36

Please sign in to comment.