Skip to content

Commit

Permalink
do not pass proxy auth header JWTs to the backend server.
Browse files Browse the repository at this point in the history
  • Loading branch information
mojitoj committed May 2, 2023
1 parent 4835424 commit b40f8e1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions controllers/FHIRProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ async function onProxyReq(proxyReq, req, res) {
? PROXY_PATH_PREFIX + req.adjustedPath
: proxyReq.path;
logger.info(`proxy -> backend: was: ${oldPath}, is: ${proxyReq.path}`);
proxyReq.setHeader("Authorization", "");
}

async function onProxyRes(proxyRes, req, res) {
Expand Down Expand Up @@ -59,10 +60,11 @@ async function processResponse(rawBackendBody, proxyRes, req, res) {
proxyRes.headers
);

const modifiedResponse = await ConsentEnforcementService.processFHIRResponse(
req,
parsedBackendResponse
);
const modifiedResponse =
await ConsentEnforcementService.processFHIRResponse(
req,
parsedBackendResponse
);
ResponseUtils.sendJsonResponse(
res,
proxyRes.headers,
Expand Down

0 comments on commit b40f8e1

Please sign in to comment.