mirror of
https://github.com/misskey-dev/media-proxy.git
synced 2025-04-29 02:47:26 +09:00
reply.send
This commit is contained in:
parent
15983012fd
commit
39908281a1
@ -166,7 +166,7 @@ async function proxyHandler(request, reply) {
|
||||
}
|
||||
reply.header('Content-Type', image.type);
|
||||
reply.header('Cache-Control', 'max-age=31536000, immutable');
|
||||
return image.data;
|
||||
return reply.send(image.data);
|
||||
}
|
||||
catch (e) {
|
||||
if ('cleanup' in file)
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "misskey-media-proxy",
|
||||
"version": "0.0.2",
|
||||
"version": "0.0.3",
|
||||
"description": "The Media Proxy for Misskey",
|
||||
"main": "built/index.js",
|
||||
"packageManager": "pnpm@7.26.0",
|
||||
@ -12,7 +12,7 @@
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"watch": "swc src -d built -D -w & fastify start -w -l info -P ./built/index.js",
|
||||
"dev": "swc src -d built -D -w & fastify start -w -l info -P ./built/index.js",
|
||||
"start": "fastify start ./server.js"
|
||||
},
|
||||
"repository": {
|
||||
|
@ -207,7 +207,7 @@ async function proxyHandler(request: FastifyRequest<{ Params: { url: string; };
|
||||
|
||||
reply.header('Content-Type', image.type);
|
||||
reply.header('Cache-Control', 'max-age=31536000, immutable');
|
||||
return image.data;
|
||||
return reply.send(image.data);
|
||||
} catch (e) {
|
||||
if ('cleanup' in file) file.cleanup();
|
||||
throw e;
|
||||
|
Loading…
x
Reference in New Issue
Block a user