feature/IO-2282-VSSTA-Integration: - checkpoint

This commit is contained in:
Dave Richer
2025-04-15 10:46:49 -04:00
parent 5b30daefe5
commit d444821cf7
9 changed files with 205 additions and 63 deletions

View File

@@ -0,0 +1,17 @@
/**
* VSSTA Integration Middleware
* @param req
* @param res
* @param next
* @returns {*}
*/
const vsstaIntegrationMiddleware = (req, res, next) => {
if (req.headers["vssta-integration-secret"] !== process.env.VSSTA_INTEGRATION_SECRET) {
return res.status(401).send("Unauthorized");
}
req.isIntegrationAuthorized = true;
next();
};
module.exports = vsstaIntegrationMiddleware;