Skip to content

Commit

Permalink
also handle list of forwarded IPs
Browse files Browse the repository at this point in the history
  • Loading branch information
dginev committed Dec 6, 2024
1 parent f65a0e6 commit 757500e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion browse/routes/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def institutional_banner() -> Any:
try:
forwarded_ips = request.headers.getlist("X-Forwarded-For")
if len(forwarded_ips)>0:
ip = forwarded_ips[0]
ip = str(forwarded_ips[0]).split(',')[0]
else:
ip = request.remote_addr
result = get_institution(ip)
Expand Down

0 comments on commit 757500e

Please sign in to comment.