< Back
Initialize-PodeCsrf
Post
NAME Initialize-PodeCsrf
SYNOPSIS
Initialises CSRF within Pode for adhoc usage.
SYNTAX
Initialize-PodeCsrf [[-IgnoreMethods] <String[]>] [[-Secret] <String>] [-UseCookies] [<CommonParameters>]
DESCRIPTION
Initialises CSRF within Pode for adhoc usage, with configurable HTTP methods to ignore verification.
PARAMETERS
-IgnoreMethods <String[]>
An array of HTTP methods to ignore CSRF verification.
Required? false
Position? 1
Default value @('Get', 'Head', 'Options', 'Trace')
Accept pipeline input? false
Accept wildcard characters? false
-Secret <String>
A secret to use when signing cookies - for when using CSRF with cookies.
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-UseCookies [<SwitchParameter>]
If supplied, CSRF will used cookies rather than sessions.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Initialize-PodeCsrf -IgnoreMethods @('Get', 'Trace')
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Initialize-PodeCsrf -Secret 'some-secret' -UseCookies
RELATED LINKS
SYNOPSIS
Initialises CSRF within Pode for adhoc usage.
SYNTAX
Initialize-PodeCsrf [[-IgnoreMethods] <String[]>] [[-Secret] <String>] [-UseCookies] [<CommonParameters>]
DESCRIPTION
Initialises CSRF within Pode for adhoc usage, with configurable HTTP methods to ignore verification.
PARAMETERS
-IgnoreMethods <String[]>
An array of HTTP methods to ignore CSRF verification.
Required? false
Position? 1
Default value @('Get', 'Head', 'Options', 'Trace')
Accept pipeline input? false
Accept wildcard characters? false
-Secret <String>
A secret to use when signing cookies - for when using CSRF with cookies.
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-UseCookies [<SwitchParameter>]
If supplied, CSRF will used cookies rather than sessions.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Initialize-PodeCsrf -IgnoreMethods @('Get', 'Trace')
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Initialize-PodeCsrf -Secret 'some-secret' -UseCookies
RELATED LINKS