Policy Customization Methods

Method Description
AddAllowedAddresses(string[]) Adds IP networks to be explicitly allowed by the policy.
AddDeniedAddresses(string[]) Adds IP networks to be explicitly blocked by the policy.
AddDeniedHeaders(string[]) Adds headers to be explicitly blocked by the policy.
AddRequiredHeaders(string[]) Adds headers to be explicitly required by the policy.

Policy Use Method

Method Description
GetHandler() Creates and returns a new AntiSSRFHandler that will enforce the policy on all outgoing requests.

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