IO-3330 CARFAX Datapump

Prep for express upgrade with return

Signed-off-by: Allan Carr <allan@imexsystems.ca>
This commit is contained in:
Allan Carr
2025-08-14 11:30:04 -07:00
parent 60258a0f5d
commit 0cadf007b5
6 changed files with 22 additions and 35 deletions

View File

@@ -29,13 +29,11 @@ const ftpSetup = {
exports.default = async (req, res) => {
// Only process if in production environment.
if (process.env.NODE_ENV !== "production") {
res.sendStatus(403);
return;
return res.sendStatus(403);
}
// Only process if the appropriate token is provided.
if (req.headers["x-imex-auth"] !== process.env.AUTOHOUSE_AUTH_TOKEN) {
res.sendStatus(401);
return;
return res.sendStatus(401);
}
// Send immediate response and continue processing.