mirror of
https://github.com/wekan/wekan.git
synced 2026-03-12 08:32:33 +01:00
Merge branch 'main' into feature/reactive-cache-async-migration
This commit is contained in:
commit
5212f3beb3
328 changed files with 15124 additions and 3392 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue