add comment on why these are strings

This commit is contained in:
Girish Ramakrishnan
2023-09-09 07:57:53 +05:30
parent 20a4136eb5
commit 8880d46dd5
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -25,6 +25,7 @@ async function getTrustedIps(req, res, next) {
async function setTrustedIps(req, res, next) {
assert.strictEqual(typeof req.body, 'object');
// this is a string to allow comments
if (typeof req.body.trustedIps !== 'string') return next(new HttpError(400, 'trustedIps must be a string'));
const [error] = await safe(reverseProxy.setTrustedIps(req.body.trustedIps, AuditSource.fromRequest(req)));