You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-70Lines changed: 24 additions & 70 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,12 @@
8
8
9
9
# Alternative package
10
10
11
-
If you prefer a python only version that does not integrate with Django, you can use the [python-ipware](https://github.com/un33k/python-ipware) package instead. `django-ipware`will use python-ipware in the future.
11
+
If you prefer a python only version that does not integrate with Django directly, but allows for more flexibility and advanced features, you can use the [python-ipware](https://github.com/un33k/python-ipware) package instead. `django-ipware`is a wrapper using [python-ipware](https://github.com/un33k/python-ipware) under the hood staring from version `6.0.0`.
12
12
13
13
# Overview
14
14
15
15
**Best attempt** to get client's IP address while keeping it **DRY**.
16
16
17
-
# Alternative package
18
-
19
-
If you prefer a python version, you can use the [python-ipware](https://github.com/un33k/python-ipware) package instead. `python-ipware` is a newer package, with more advanced features. While this a Django specific package, `python-ipware` can be used with Django, Flask, etc.
20
-
21
17
# Notice
22
18
23
19
There is no perfect `out-of-the-box` solution against fake IP addresses, aka `IP Address Spoofing`.
@@ -56,30 +52,39 @@ Please use ipware `ONLY` as a complement to your `firewall` security measures!
56
52
# The client's IP address is publicly routable on the Internet
57
53
else:
58
54
# The client's IP address is private
59
-
60
-
# Order of precedence is (Public, Private, Loopback, None)
61
55
```
62
56
63
57
# Advanced users:
64
58
65
59
-### Precedence Order
66
60
67
-
The default meta precedence order is top to bottom. However, you may customize the order
61
+
The default meta precedence order is top to bottom. You may customize the order
68
62
by providing your own `IPWARE_META_PRECEDENCE_ORDER` by adding it to your project's settings.py
69
63
70
64
```python
71
-
# The default meta precedence order
65
+
# The default meta precedence order (update as needed)
0 commit comments