Skip to content

Commit

Permalink
TritonDataCenter#35 want ability to use "referer" header in RBAC rules
Browse files Browse the repository at this point in the history
TritonDataCenter#34 using user-agent in RBAC rules can lead to 500 errors
  • Loading branch information
arekinath committed Jan 28, 2025
1 parent 44d91e9 commit 58aba2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,8 @@ function gatherContext(req, res, next) {
if (ip) {
conditions.sourceip = ip.split(',')[0].trim();
}
conditions['user-agent'] = req.headers['user-agent'];
conditions['referer'] = req.headers['referer'] || '';
conditions['user-agent'] = req.headers['user-agent'] || '';
conditions.fromjob = false;

// Override conditions with ones that are provided in the token
Expand Down

0 comments on commit 58aba2e

Please sign in to comment.