Skip to content

Commit

Permalink
production環境では/proxy以下へのリクエストに404を返すように
Browse files Browse the repository at this point in the history
  • Loading branch information
adzukimame committed Dec 11, 2024
1 parent 707196e commit e3ff311
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/backend/src/server/FileServerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ export class FileServerService {
done();
});

if (process.env.NODE_ENV !== 'production') {
if (process.env.NODE_ENV === 'production') {
fastify.get('/proxy/*', async (request, reply) => {
return reply.status(404).send();
});
} else {
fastify.get<{
Params: { url: string; };
Querystring: { url?: string; };
Expand Down

0 comments on commit e3ff311

Please sign in to comment.