chore: always return integers for Cache-Control max-age

This commit is contained in:
WebStreamr 2025-09-02 14:51:31 +00:00
parent 969ab8d0d7
commit 1b89cadab5
No known key found for this signature in database

View file

@ -54,7 +54,7 @@ export class StreamController {
const { streams, ttl } = await this.streamResolver.resolve(ctx, sources, type, id);
if (ttl && envIsProd()) {
res.setHeader('Cache-Control', `max-age=${ttl / 1000}, public`);
res.setHeader('Cache-Control', `max-age=${Math.floor(ttl / 1000)}, public`);
}
res.setHeader('Content-Type', 'application/json');