- Create api/bilibili.ts to handle Bilibili API requests in production
- Proxy requests to https://s.search.bilibili.com/main/suggest
- Add proper headers (User-Agent, Referer) to avoid blocking
- Set CORS headers and cache control (60s)
- Handle errors gracefully with fallback response
- Update src/utils/suggestions.ts to detect environment
- Use /bilibili (Vite proxy) in development
- Use /api/bilibili (Vercel Function) in production
- Check import.meta.env.DEV to determine environment
This fixes the 404 error in production where Vite proxy is not available.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>