Commit 2bb85a4
authored
fix(api): add X-Cache-Status header for refresh=true responses (JhaSourav07#943) (JhaSourav07#960)
Closes JhaSourav07#943
## What changed
Added `X-Cache-Status` response header to `app/api/streak/route.ts`:
- `BYPASS, fetched=<ISO timestamp>` when `refresh=true`
- `HIT` for normal cached responses
## How to test
```bash
curl -I "https://<your-deployment>/api/streak?user=YOUR_USERNAME&refresh=true"
# X-Cache-Status: BYPASS, fetched=2026-05-28T...
curl -I "https://<your-deployment>/api/streak?user=YOUR_USERNAME"
# X-Cache-Status: HIT
```1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| |||
0 commit comments