Docker 런타임 환경 변수 우선 적용

This commit is contained in:
2026-05-14 13:48:23 +09:00
parent 4862b52b3a
commit 1b035de16c
17 changed files with 84 additions and 24 deletions

View File

@@ -3,6 +3,7 @@ import { z } from 'zod'
import { createError, readBody } from 'h3'
import { updateMemberPasswordByEmail } from '../../../repositories/member-repository'
import { verifyAndConsumeEmailOtp } from '../../../repositories/email-otp-repository'
import { getRuntimeEnvValue } from '../../../utils/runtime-env'
const bodySchema = z.object({
email: z.string().trim().email(),
@@ -24,8 +25,7 @@ export default defineEventHandler(async (event) => {
})
}
const config = useRuntimeConfig()
const pepper = String(config.emailOtpPepper || config.memberSessionSecret || '').trim()
const pepper = getRuntimeEnvValue('EMAIL_OTP_PEPPER', 'emailOtpPepper', getRuntimeEnvValue('MEMBER_SESSION_SECRET', 'memberSessionSecret')).trim()
if (!pepper) {
throw createError({
statusCode: 500,