Improve video loading and display with error handling and updated headers

Improves thumbnail loading in VideoCard component with error handling and updates response headers in /thumbnail route.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 50814a1e-92e4-4968-856f-7bc7eedf5e8f
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/50814a1e-92e4-4968-856f-7bc7eedf5e8f/WNLqOHv
This commit is contained in:
sebastjanartic
2025-08-04 19:48:38 +00:00
parent b57b48818d
commit 1321038609
3 changed files with 39 additions and 13 deletions
+2 -1
View File
@@ -167,8 +167,9 @@ export async function registerRoutes(app: Express): Promise<Server> {
</svg>
`;
res.setHeader('Content-Type', 'image/svg+xml');
res.setHeader('Content-Type', 'image/svg+xml; charset=utf-8');
res.setHeader('Cache-Control', 'public, max-age=86400');
res.setHeader('Access-Control-Allow-Origin', '*');
res.send(svg);
} catch (error) {