New PodeLimitIPComponent - mdaneri/Pode GitHub Wiki
Creates a new Limit IP component.
New-PodeLimitIPComponent [[-IP] <String[]>] [[-Location] <String>] [[-XForwardedForType] <String>] [-Group]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Creates a new Limit IP component. This supports the WebEvent, SmtpEvent, and TcpEvent IPs.
New-PodeLimitIPComponent
New-PodeLimitIPComponent -IP '127.0.0.1'
New-PodeLimitIPComponent -IP '10.0.0.0/24'
New-PodeLimitIPComponent -IP 'localhost'
New-PodeLimitIPComponent -IP 'all'
New-PodeLimitIPComponent -IP '192.0.1.0/16' -Group
New-PodeLimitIPComponent -IP '10.0.0.1' -Location XForwardedFor
New-PodeLimitIPComponent -IP '192.0.1.0/16' -Group -Location XForwardedFor -XForwardedForType Rightmost
If supplied, IPs in a subnet will be treated as a single entity.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
The IP address(es) to check. Supports raw IPs, subnets, local, and any.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Where to get the IP from: RemoteAddress or XForwardedFor. (Default: RemoteAddress)
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: RemoteAddress
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
If the Location is XForwardedFor, which IP in the X-Forwarded-For header to use: Leftmost, Rightmost, or All. (Default: Leftmost) If Leftmost, the first IP in the X-Forwarded-For header will be used. If Rightmost, the last IP in the X-Forwarded-For header will be used. If All, all IPs in the X-Forwarded-For header will be used - at least one must match.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: Leftmost
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.