Class: AWSCDK::WAFv2::CfnWebACL::ForwardedIPConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::WAFv2::CfnWebACL::ForwardedIPConfigurationProperty
- Defined in:
- wa_fv2/cfn_web_acl.rb
Overview
The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin.
Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.
If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
This configuration is used for GeoMatchStatement , AsnMatchStatement , and RateBasedStatement . For IPSetReferenceStatement , use IPSetForwardedIPConfig instead.
AWS WAF only evaluates the first IP address found in the specified HTTP header.
Instance Attribute Summary collapse
-
#fallback_behavior ⇒ String
readonly
The match status to assign to the web request if the request doesn't have a valid IP address in the specified position.
-
#header_name ⇒ String
readonly
The name of the HTTP header to use for the IP address.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(fallback_behavior:, header_name:) ⇒ ForwardedIPConfigurationProperty
constructor
A new instance of ForwardedIPConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(fallback_behavior:, header_name:) ⇒ ForwardedIPConfigurationProperty
Returns a new instance of ForwardedIPConfigurationProperty.
2714 2715 2716 2717 2718 2719 |
# File 'wa_fv2/cfn_web_acl.rb', line 2714 def initialize(fallback_behavior:, header_name:) @fallback_behavior = fallback_behavior Jsii::Type.check_type(@fallback_behavior, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "fallbackBehavior") @header_name = header_name Jsii::Type.check_type(@header_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "headerName") end |
Instance Attribute Details
#fallback_behavior ⇒ String (readonly)
The match status to assign to the web request if the request doesn't have a valid IP address in the specified position.
If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
You can specify the following fallback behaviors:
MATCH- Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request.NO_MATCH- Treat the web request as not matching the rule statement.
2732 2733 2734 |
# File 'wa_fv2/cfn_web_acl.rb', line 2732 def fallback_behavior @fallback_behavior end |
#header_name ⇒ String (readonly)
The name of the HTTP header to use for the IP address.
For example, to use the X-Forwarded-For (XFF) header, set this to X-Forwarded-For .
If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
2741 2742 2743 |
# File 'wa_fv2/cfn_web_acl.rb', line 2741 def header_name @header_name end |
Class Method Details
.jsii_properties ⇒ Object
2743 2744 2745 2746 2747 2748 |
# File 'wa_fv2/cfn_web_acl.rb', line 2743 def self.jsii_properties { :fallback_behavior => "fallbackBehavior", :header_name => "headerName", } end |
Instance Method Details
#to_jsii ⇒ Object
2750 2751 2752 2753 2754 2755 2756 2757 |
# File 'wa_fv2/cfn_web_acl.rb', line 2750 def to_jsii result = {} result.merge!({ "fallbackBehavior" => @fallback_behavior, "headerName" => @header_name, }) result.compact end |