Add ability to set cookie prefix for session cookies ( #87 )

This commit is contained in:
2025-11-12 12:27:53 +00:00
parent 4db17ce24a
commit 16a93b5ca8
21 changed files with 228 additions and 70 deletions
+2 -2
View File
@@ -468,7 +468,7 @@ func TestSessionFixationAttack(t *testing.T) {
tc := newTestCleanup(t)
logger := NewLogger("debug")
sm, err := NewSessionManager("test-secret-key-that-is-at-least-32-bytes", false, "", logger)
sm, err := NewSessionManager("test-secret-key-that-is-at-least-32-bytes", false, "", "", logger)
if err != nil {
t.Fatalf("Failed to create session manager: %v", err)
}
@@ -625,7 +625,7 @@ func TestSessionFixationAttack(t *testing.T) {
// TestCSRFProtection tests CSRF protection in POST requests
func TestCSRFProtection(t *testing.T) {
logger := NewLogger("debug")
sm, err := NewSessionManager("test-secret-key-that-is-at-least-32-bytes", false, "", logger)
sm, err := NewSessionManager("test-secret-key-that-is-at-least-32-bytes", false, "", "", logger)
if err != nil {
t.Fatalf("Failed to create session manager: %v", err)
}