Skip to content

Commit 2d86eec

Browse files
committed
reject non-studio-mode calls to pack-course
1 parent d0dffc6 commit 2d86eec

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/express/src/app.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,16 @@ async function postHandler(
171171
res.json(e);
172172
});
173173
} else if (body.type === RequestEnum.PACK_COURSE) {
174+
if (process.env.NODE_ENV !== 'studio') {
175+
logger.info(
176+
`\tPACK_COURSE request received in production mode, but this is not supported!`
177+
);
178+
res.status(400);
179+
res.statusMessage = 'Packing courses is not supported in production mode.';
180+
res.send();
181+
return;
182+
}
183+
174184
body.response = await packCourse({
175185
courseId: body.courseId,
176186
outputPath: body.outputPath

0 commit comments

Comments
 (0)