Commit 2eb124a
authored
Fix Cache-Control s-maxage in Streak Route Using Computed secondsToMidnight (JhaSourav07#8172)
* fix: use computed secondsToMidnight in streak route Cache-Control s-maxage
The route computed secondsToMidnight using getSecondsUntilMidnightInTimezone /
getSecondsUntilUTCMidnight but hardcoded s-maxage=1 in both the JSON and SVG
response paths. This caused CDN cache to expire every 1 second regardless of
timezone and made the timezone-boundaries test suite fail.
Replace hardcoded s-maxage=1 with the computed value in both paths. Also fix 3
test assertions in route.test.ts that were asserting the broken behavior.
Fixes JhaSourav07#8170
* chore: trigger CI rerun
* test: fix timezone boundary tests to expect correct s-maxage1 parent 25ec7f3 commit 2eb124a
3 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
Binary file not shown.
Binary file not shown.
0 commit comments