Class: AWSCDK::WAFv2::CfnRuleGroup::ForwardedIPConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::WAFv2::CfnRuleGroup::ForwardedIPConfigurationProperty
- Defined in:
- wa_fv2/cfn_rule_group.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.
1779 1780 1781 1782 1783 1784 |
# File 'wa_fv2/cfn_rule_group.rb', line 1779 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.
1797 1798 1799 |
# File 'wa_fv2/cfn_rule_group.rb', line 1797 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.
1806 1807 1808 |
# File 'wa_fv2/cfn_rule_group.rb', line 1806 def header_name @header_name end |
Class Method Details
.jsii_properties ⇒ Object
1808 1809 1810 1811 1812 1813 |
# File 'wa_fv2/cfn_rule_group.rb', line 1808 def self.jsii_properties { :fallback_behavior => "fallbackBehavior", :header_name => "headerName", } end |
Instance Method Details
#to_jsii ⇒ Object
1815 1816 1817 1818 1819 1820 1821 1822 |
# File 'wa_fv2/cfn_rule_group.rb', line 1815 def to_jsii result = {} result.merge!({ "fallbackBehavior" => @fallback_behavior, "headerName" => @header_name, }) result.compact end |