Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
+23
@@ -0,0 +1,23 @@
|
||||
import { describe, expect, test } from "vitest";
|
||||
import { resolveSessionCookiePolicy } from "./session-cookie.js";
|
||||
|
||||
describe("session cookie domain resolution for bracketed IPv6 hosts", () => {
|
||||
test("keeps loopback IPv6 cookies domainless", () => {
|
||||
const policy = resolveSessionCookiePolicy({
|
||||
nodeEnv: "development",
|
||||
routing: { appBaseDomain: "[::1]:3000", protocol: "http" },
|
||||
});
|
||||
|
||||
expect(policy).not.toHaveProperty("domain");
|
||||
expect(policy).toMatchObject({ sameSite: "lax", secure: false, httpOnly: true, path: "/" });
|
||||
});
|
||||
|
||||
test("derives the bracket-stripped hostname for routable IPv6 base domains", () => {
|
||||
const policy = resolveSessionCookiePolicy({
|
||||
nodeEnv: "production",
|
||||
routing: { appBaseDomain: "[2001:db8::1]:8443", protocol: "https" },
|
||||
});
|
||||
|
||||
expect(policy).toMatchObject({ domain: "2001:db8::1", secure: true });
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user