Skip to content

v0.3.0

Choose a tag to compare

@davidmytton davidmytton released this 02 Feb 16:02
· 93 commits to main since this release
Immutable release. Only release title and notes can be modified.
202ddc9

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

Full Changelog: v0.2.3...v0.3.0