/files/:key/*を301 redirectに
This commit is contained in:
parent
b15d85076c
commit
cab7ee18d6
|
@ -82,8 +82,7 @@ export class FileServerService {
|
||||||
.catch(err => this.errorHandler(request, reply, err));
|
.catch(err => this.errorHandler(request, reply, err));
|
||||||
});
|
});
|
||||||
fastify.get<{ Params: { key: string; } }>('/files/:key/*', async (request, reply) => {
|
fastify.get<{ Params: { key: string; } }>('/files/:key/*', async (request, reply) => {
|
||||||
return await this.sendDriveFile(request, reply)
|
return await reply.redirect(301, `${this.config.url}/files/${request.params.key}`);
|
||||||
.catch(err => this.errorHandler(request, reply, err));
|
|
||||||
});
|
});
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue