Fix Telegram avatar proxy headers
All checks were successful
Build and deploy Backend / build (push) Successful in 35s
All checks were successful
Build and deploy Backend / build (push) Successful in 35s
This commit is contained in:
@@ -41,6 +41,8 @@ app.get('/telegram/photo/:fileId', async (request, reply) => {
|
||||
const photo = await fetchTelegramPhoto(params.fileId);
|
||||
reply.header('content-type', photo.contentType);
|
||||
reply.header('cache-control', 'public, max-age=86400');
|
||||
reply.header('access-control-allow-origin', '*');
|
||||
reply.header('cross-origin-resource-policy', 'cross-origin');
|
||||
return reply.send(photo.bytes);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user