diff --git a/src/middleware/pnid.ts b/src/middleware/pnid.ts index 2381bc3..4bc769c 100644 --- a/src/middleware/pnid.ts +++ b/src/middleware/pnid.ts @@ -20,7 +20,7 @@ async function PNIDMiddleware(request: express.Request, response: express.Respon token = Buffer.from(token, 'hex').toString('base64'); } - if (type === 'Basic') { + if (type === 'Basic' && request.path.includes('v1/api/people/@me/devices')) { pnid = await getPNIDByBasicAuth(token); } else if (type === 'Bearer') { // TODO - This "accepted types list" is mostly a hack. Change this