Skip to content

Commit

Permalink
up version python-ipware (#118)
Browse files Browse the repository at this point in the history
* up version python-ipware
  • Loading branch information
un33k authored Apr 19, 2024
1 parent a83d2f2 commit fda1dc7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 7.0.0

Enhance:
- Up version python-ipware (minimal possible api / compatibility change)

# 6.0.5

Enhance:
Expand Down
2 changes: 1 addition & 1 deletion ipware/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
__url__ = 'https://github.com/un33k/django-ipware'
__license__ = 'MIT'
__copyright__ = 'Copyright 2023 Val Neekman @ Neekware Inc.'
__version__ = '6.0.5'
__version__ = '7.0.0'
4 changes: 1 addition & 3 deletions ipware/ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ def get_client_ip(
request_header_order: Optional[Iterable[str]] = None,
) -> Tuple[str, bool]:
leftmost = proxy_order == 'left-most'
proxy_count = proxy_count if proxy_count is not None else getattr(settings, 'IPWARE_META_PROXY_COUNT', 0)
proxy_list = proxy_trusted_ips if proxy_trusted_ips is not None else []
request_header_order = getattr(settings, 'IPWARE_META_PRECEDENCE_ORDER', request_header_order)

# Instantiate IpWare with values from the function arguments
ipw = IpWare(precedence=request_header_order,
leftmost=leftmost,
proxy_count=proxy_count,
proxy_list=proxy_list)
proxy_list=proxy_trusted_ips)

ip, _ = ipw.get_client_ip(request.META, True)

Expand Down

0 comments on commit fda1dc7

Please sign in to comment.