Skip to content

OG 태그 메타 정보 제공 API 구현#118

Merged
ckdals4600 merged 1 commit intomainfrom
feature/#102-link-add-api
Dec 20, 2025
Merged

OG 태그 메타 정보 제공 API 구현#118
ckdals4600 merged 1 commit intomainfrom
feature/#102-link-add-api

Conversation

@minibr
Copy link
Contributor

@minibr minibr commented Dec 10, 2025

관련 이슈

PR 설명

URL의 OG(Open Graph) 태그를 크롤링하여 메타 정보를 수집하는 API를 구현합니다.
POST /v1/links/meta-scrape - URL의 OG 태그 메타 정보 수집

  1. OgTagCrawler
  • Jsoup을 사용한 OG 태그 크롤링
  • 수집 정보: title, description, image, url
  • 타임아웃: 5초
  1. UrlValidator (SSRF 방어)
  • Private IP 차단: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
  • Loopback 차단: 127.0.0.0/8, localhost, ::1
  • Link-local 차단: 169.254.0.0/16
  • AWS 메타데이터 서버 차단: 169.254.169.254
  • 프로토콜 검증: http, https만 허용

API 명세

POST /v1/links/meta-scrape

// Request
{
  "url": "https://example.com"
}

// Response
{
  "status": "SUCCESS",
  "message": "메타 정보 수집 완료",
  "data": {
    "title": "Example Domain",
    "description": "This domain is for use in...",
    "image": "https://example.com/image.jpg",
    "url": "https://example.com"
  }
}

POST /v1/links (수정)

  // Request (force 파라미터 추가)
  {
    "url": "https://example.com",
    "title": "제목",
    "memo": "메모",
    "imageUrl": "https://...",
  }

@minibr minibr linked an issue Dec 10, 2025 that may be closed by this pull request
@minibr minibr force-pushed the feature/#102-link-add-api branch from 6e98420 to 2002513 Compare December 10, 2025 12:35
@minibr minibr force-pushed the feature/#102-link-add-api branch 6 times, most recently from a7b4dfd to 727118d Compare December 14, 2025 16:38
@minibr minibr changed the title 링크 추가 API에 OG 태그 메타 정보 수집 및 중복 링크 처리 기능 추가 링크 추가 API에 OG 태그 메타 정보 수집 Dec 14, 2025
@minibr minibr force-pushed the feature/#102-link-add-api branch from 727118d to db9d10c Compare December 14, 2025 18:08
@github-actions
Copy link

github-actions bot commented Dec 14, 2025

📊 코드 커버리지 리포트

Overall Project 90.7% -1.02% 🍏
Files changed 89.24% 🍏

File Coverage
LinkController.java 100% 🍏
LinkErrorCode.java 100% 🍏
LinkFacade.java 100% 🍏
UrlValidator.java 86.89% -13.11% 🍏

@minibr minibr requested a review from Goder-0 December 14, 2025 18:11
@minibr minibr force-pushed the feature/#102-link-add-api branch 3 times, most recently from a0da9bb to 2ea85d2 Compare December 17, 2025 12:53
@minibr minibr requested a review from ckdals4600 December 17, 2025 12:58
@minibr minibr force-pushed the feature/#102-link-add-api branch from 2ea85d2 to f157d1e Compare December 18, 2025 15:05
@ckdals4600 ckdals4600 changed the title 링크 추가 API에 OG 태그 메타 정보 수집 OG 태그 메타 정보 제공 API 구현 Dec 20, 2025
@ckdals4600 ckdals4600 force-pushed the feature/#102-link-add-api branch 3 times, most recently from 95523ae to 26048c0 Compare December 20, 2025 07:35
@ckdals4600 ckdals4600 force-pushed the feature/#102-link-add-api branch from 26048c0 to e4b852f Compare December 20, 2025 07:35
@ckdals4600 ckdals4600 merged commit cc57e56 into main Dec 20, 2025
1 check passed
@ckdals4600 ckdals4600 deleted the feature/#102-link-add-api branch December 20, 2025 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OG 태그 크롤링

2 participants