Skip to content

feat: replace Cloudflare Worker with Defuddle API - #21

Merged
toy-crane merged 6 commits into
mainfrom
test-defuddle-api
Apr 8, 2026
Merged

feat: replace Cloudflare Worker with Defuddle API#21
toy-crane merged 6 commits into
mainfrom
test-defuddle-api

Conversation

@toy-crane

Copy link
Copy Markdown
Owner

Summary

  • Cloudflare Worker 대신 defuddle.md 호스팅 API를 사용하는 Next.js API route 생성 (app/api/extract/route.ts)
  • use-extract 훅에서 NEXT_PUBLIC_EXTRACT_API_URL 환경변수 의존 제거, /api/extract 직접 호출로 변경
  • Worker 관리 포인트 제거로 인프라 단순화

Test plan

  • bun run dev로 로컬 실행 후 일반 웹페이지 URL 추출 테스트
  • YouTube URL 추출 테스트 (자막 포함 여부 확인)
  • Vercel preview 배포에서 동작 확인

🤖 Generated with Claude Code

@vercel

vercel Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
feedme Ready Ready Preview, Comment Apr 8, 2026 1:59am

toy-crane and others added 6 commits April 8, 2026 10:57
Create Next.js API route that proxies to defuddle.md hosted service,
removing the dependency on the self-hosted Cloudflare Worker for content
extraction.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pass the target URL directly as a path to match the documented API
usage pattern (curl defuddle.md/example.com).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cloudflare bot protection blocks Vercel datacenter IPs (403), so
server-side proxy doesn't work. Move the fetch to the client side
where browser requests pass through Cloudflare. Defuddle API supports
CORS *, so this works without a server route.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Document the investigation, Cloudflare bot protection issue, and
client-side direct call approach.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Delete workers/extract/ directory, worker spec tests, env vars
(NEXT_PUBLIC_EXTRACT_API_URL), and replace-api-to-worker feature
from spec.yaml. Update test script to remove worker test run.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All test helpers and spec tests now mock fetch responses as
text/markdown with YAML frontmatter, matching the Defuddle API
response format. Skip ALIGN-001 (webpage thumbnail) as Defuddle API
doesn't include thumbnails in frontmatter.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@toy-crane
toy-crane force-pushed the test-defuddle-api branch from 2da65c1 to 0af03bc Compare April 8, 2026 01:59
@toy-crane
toy-crane merged commit 75a5088 into main Apr 8, 2026
2 of 3 checks passed
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.

1 participant