Skip to content

Commit

Permalink
Add defensive code.
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 8, 2022
1 parent bc4c072 commit 0700acc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/access_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ function pepResponse(req, res) {
debug(req.user ? 'Permitted.' : 'Public path.');
res.statusCode = response.statusCode;
res.headers = response.headers;
res.type(response.headers['content-type'])
if (response.headers['content-type']){
res.type(response.headers['content-type'])
}
return response.body ? res.send(response.body) : res.send();
})
.catch((error) => {
Expand Down

0 comments on commit 0700acc

Please sign in to comment.