• Phạm Quang Bảo's avatar
    feat: add custom SEO image optimization endpoint with sharp · 1b566648
    Phạm Quang Bảo authored
    - Add sharp@0.34.5 dependency for server-side image processing
    - Create /api/seo-image endpoint to resize og:images to 1200x630 JPEG
    - Replace toOptimizedSeoImageUrl with toSeoImageUrl routing through custom endpoint
    - Implement host validation to prevent open proxy abuse (allow vcci-hcm.org.vn, vccihcm.vn)
    - Add automatic fallback to /thumbnail.png when source image fails
    - Set aggressive caching headers (max-age=86400, s-maxage=2592000)
    - Support both absolute
    1b566648
route.ts 3.69 KB