v0.3.0
·
93 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Summary
The detected client IP address can now be overridden. Set disable_automatic_ip_detection=True when creating the Arcjet client, and then provide the ip_src parameter to .protect(...).
from arcjet import arcjet
aj = arcjet(
key=os.environ["ARCJET_KEY"],
rules=[...],
disable_automatic_ip_detection=True,
)
# ...
decision = aj.protect(
request,
ip_src="8.8.8.8", # provide the client IP here
)Warning
Disabling automatic IP detection is not recommended unless you have written your own IP detection logic that considers the correct parsing of IP headers. Accepting client IPs from untrusted sources can expose your application to IP spoofing attacks. See the MDN documentation for further guidance.
Detailed changes
- chore: add griffe breaking check to ci by @qw-in in #31
- feat: allow overriding ip detection by @davidmytton in #30
- chore(deps): bump deps and pin connect to 0.7.x by @davidmytton in #32
- chore: bump to v0.3.0 by @davidmytton in #33
Full Changelog: v0.2.3...v0.3.0