mirror of
https://github.com/complexcaresolutions/cms.c2sgmbh.git
synced 2026-03-17 16:14:12 +00:00
fix(ci): use process.env directly for BYPASS_CSRF setting
vi.stubEnv doesn't work reliably with dynamically imported modules. Using direct process.env assignment instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
97ede2ceb9
commit
eb48088887
1 changed files with 2 additions and 1 deletions
|
|
@ -9,7 +9,8 @@ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'
|
|||
import { NextRequest, NextResponse } from 'next/server'
|
||||
|
||||
// Enable CSRF validation in CI by setting BYPASS_CSRF=false
|
||||
vi.stubEnv('BYPASS_CSRF', 'false')
|
||||
// This must be set before any module imports that read this variable
|
||||
process.env.BYPASS_CSRF = 'false'
|
||||
import {
|
||||
generateTestCsrfToken,
|
||||
generateExpiredCsrfToken,
|
||||
|
|
|
|||
Loading…
Reference in a new issue