Merge branch 'main' into feature/reactive-cache-async-migration

This commit is contained in:
Harry Adel 2026-02-17 16:45:06 +02:00
commit 5212f3beb3
328 changed files with 15124 additions and 3392 deletions

View file

@ -68,7 +68,7 @@ if (Meteor.isServer) {
res.setHeader('Content-Length', avatar.size || 0);
res.setHeader('Cache-Control', 'public, max-age=31536000'); // Cache for 1 year
res.setHeader('ETag', `"${avatar._id}"`);
// Handle conditional requests
const ifNoneMatch = req.headers['if-none-match'];
if (ifNoneMatch && ifNoneMatch === `"${avatar._id}"`) {
@ -106,12 +106,12 @@ if (Meteor.isServer) {
try {
const fileName = req.params[0];
// Redirect to new avatar URL format
const newUrl = `/cdn/storage/avatars/${fileName}`;
res.writeHead(301, { 'Location': newUrl });
res.end();
} catch (error) {
console.error('Legacy avatar redirect error:', error);
res.writeHead(500);