feat: add custom SEO image optimization endpoint with sharp
- 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
Showing
| ... | ... | @@ -58,6 +58,7 @@ |
| "react-dom": "19.2.0", | ||
| "react-hook-form": "^7.65.0", | ||
| "react-resizable-panels": "^3.0.6", | ||
| "sharp": "0.34.5", | ||
| "sonner": "^2.0.7", | ||
| "swiper": "^12.0.3", | ||
| "tailwind-merge": "^3.3.1", | ||
| ... | ... |
Please register or sign in to comment