/** 解析 `ALLOWED_DEV_ORIGINS`（逗号分隔），供 next.config `allowedDevOrigins` 使用 */
export function parseAllowedDevOrigins(envValue: string | undefined): string[] {
  if (envValue === undefined || envValue.trim() === "") {
    return [];
  }

  return envValue
    .split(",")
    .map((origin) => origin.trim())
    .filter((origin) => origin !== "");
}
