Policy Customization Methods

Method Description
add_allowed_addresses(list[str]) Adds IP networks to be explicitly allowed by the policy.
add_denied_addresses(list[str]) Adds IP networks to be explicitly blocked by the policy.
add_denied_headers(list[str]) Adds headers to be explicitly blocked by the policy.
add_required_headers(list[str]) Adds headers to be explicitly required by the policy.

Policy Use Methods

Method Description
get_antissrf_session(any) -> AntiSSRFSession Builds a requests.Session that enforces AntiSSRFPolicy on all outgoing requests.

Copyright © 2026 Microsoft Corporation. Distributed under the MIT license.