|
|
@@ -13,6 +13,27 @@ internal sealed class Config : IEndpoint
|
|
|
) => {
|
|
|
var result = await sender.Send(new Application.Features.Config.Get.Query(), ct);
|
|
|
|
|
|
+ // 공개(익명) 응답 정화 — 민감 Basic 필드는 프론트가 쓰지 않으며 노출 시 심각한 보안 위험
|
|
|
+ // (SMTP 자격증명 = 메일계정 탈취, RootID = 최고관리자 ID, IP 화이트리스트 = 인프라 노출).
|
|
|
+ // 화이트리스트 방식(default-deny): 안전 필드만 복사 → 이후 새 Basic 필드도 명시 전엔 비공개.
|
|
|
+ // Admin/DirectMailService/MailWorker 는 in-process(mediator·cache·DB)로 원본을 읽어 영향 없음.
|
|
|
+ if (result is not null)
|
|
|
+ {
|
|
|
+ result.Basic = new Application.Features.Config.Get.Response.BasicConfigDto
|
|
|
+ {
|
|
|
+ SiteName = result.Basic.SiteName,
|
|
|
+ SiteURL = result.Basic.SiteURL,
|
|
|
+ FromEmail = result.Basic.FromEmail,
|
|
|
+ FromName = result.Basic.FromName,
|
|
|
+ BlockAlertTitle = result.Basic.BlockAlertTitle,
|
|
|
+ BlockAlertContent = result.Basic.BlockAlertContent,
|
|
|
+ IsMaintenance = result.Basic.IsMaintenance,
|
|
|
+ MaintenanceContent = result.Basic.MaintenanceContent,
|
|
|
+ NoteDailySendLimit = result.Basic.NoteDailySendLimit
|
|
|
+ // 비공개(제외): RootID, SmtpServer, SmtpPort, SmtpEnableSSL, SmtpUsername, SmtpPassword, AdminWhiteIPList, FrontWhiteIPList
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
return ApiResponse.Ok(result);
|
|
|
})
|
|
|
.WithTags("Config")
|