You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(og): stop bypassing cache on every OG image request (JhaSourav07#3412)
## Description
Fixes a bug where the OG image endpoint was bypassing cache on every
request, firing a fresh GitHub GraphQL call on each link-preview bot
crawl (Slack, Discord, Twitter etc.) and silently exhausting API rate
limit quota.
ClosesJhaSourav07#3398
## Pillar
Bug Fix
## Changes Made
- Switched `ogParamsSchema.parse()` to `safeParse()` with proper 400
error response
- Changed `bypassCache: true` to `bypassCache: refresh`
- Added `refresh` field to `ogParamsSchema`
- Aligned `Cache-Control` response header with actual fetch behaviour
## Checklist
- [x] My code follows the project style guidelines
- [x] I have performed a self-review of my code
- [x] I have run `npm run lint` and `npm run typecheck` locally
- [x] No new errors introduced
- [x] Related issue is linked above
0 commit comments