diff --git a/backend/src/modules/pet-card/dto/pet-card.dto.ts b/backend/src/modules/pet-card/dto/pet-card.dto.ts index d04a04c..97e4cf8 100644 --- a/backend/src/modules/pet-card/dto/pet-card.dto.ts +++ b/backend/src/modules/pet-card/dto/pet-card.dto.ts @@ -13,9 +13,12 @@ import { IsHexColor } from '@/common/validators'; import { SCRIM_TONES } from '../entities/pet-card.entity'; import type { PetCard, ScrimTone } from '../entities/pet-card.entity'; -/** 앱에 들어 있는 배경 그림 경로 — 경로 탈출·다른 형식을 막는다 */ +/** + * 앱에 들어 있는 배경 그림 경로 (assets/svg/card_bg/bg_1.svg 등) — 경로 탈출·다른 형식을 막는다. + * 앱 번들 안의 경로를 가리킬 뿐 서버가 이 파일을 내려주지 않으므로 svg 도 받는다. + */ const ASSET_PATH_PATTERN = - /^assets\/[A-Za-z0-9_-]+(\/[A-Za-z0-9_-]+)*\.(png|jpg|jpeg|webp)$/; + /^assets\/[A-Za-z0-9_-]+(\/[A-Za-z0-9_-]+)*\.(png|jpg|jpeg|webp|svg)$/; /** 명함 꾸미기 값 (앱의 CardStyle) — 배경은 색·그림·사진 중 하나만 */ export class CardStyleDto {