Docker 런타임 환경 변수 우선 적용
This commit is contained in:
3
server/api/auth/bootstrap-status.get.js
vendored
3
server/api/auth/bootstrap-status.get.js
vendored
@@ -1,5 +1,6 @@
|
||||
import { getMemberBootstrapState } from '../../repositories/member-repository'
|
||||
import { isResendConfigured } from '../../utils/resend-mail'
|
||||
import { getRuntimeEnvValue } from '../../utils/runtime-env'
|
||||
|
||||
/**
|
||||
* 최초 관리자 등록 필요 여부·이메일 OTP(Resend) 사용 가능 여부를 조회한다.
|
||||
@@ -8,7 +9,7 @@ import { isResendConfigured } from '../../utils/resend-mail'
|
||||
export default defineEventHandler(async () => {
|
||||
const base = await getMemberBootstrapState()
|
||||
const config = useRuntimeConfig()
|
||||
const hasPepper = Boolean(String(config.emailOtpPepper || config.memberSessionSecret || '').trim())
|
||||
const hasPepper = Boolean(getRuntimeEnvValue('EMAIL_OTP_PEPPER', 'emailOtpPepper', getRuntimeEnvValue('MEMBER_SESSION_SECRET', 'memberSessionSecret')).trim())
|
||||
const emailOtpConfigured = isResendConfigured(config) && hasPepper
|
||||
return {
|
||||
...base,
|
||||
|
||||
Reference in New Issue
Block a user