1
0
forked from baron/baron-sso

RP 공개키 등록 UI 및 SSH-RSA 자동 변환 기능 구현

This commit is contained in:
2026-03-27 12:33:05 +09:00
parent 2a162f0efe
commit cf3d049367
6 changed files with 660 additions and 27 deletions

View File

@@ -122,10 +122,11 @@ function formatTemplate(
template: string,
vars?: Record<string, string | number>,
): string {
const normalizedTemplate = template.replace(/\\n/g, "\n");
if (!vars) {
return template;
return normalizedTemplate;
}
return template.replace(/\{\{\s*(\w+)\s*\}\}/g, (match, key) => {
return normalizedTemplate.replace(/\{\{\s*(\w+)\s*\}\}/g, (match, key) => {
const value = vars[key];
if (value === undefined || value === null) {
return match;