Skip to content

Commit

Permalink
Fix javlibrary websession cookie domain (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
jvlflame committed Dec 25, 2020
1 parent e67b854 commit fba887e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Javinizer/Public/Get-CfSession.ps1
Expand Up @@ -15,12 +15,14 @@ function Get-CfSession {
)

process {
$BaseUrl = $BaseUrl -replace 'http(s)?:\/\/(www)?'
$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
$cookie = New-Object System.Net.Cookie('__cfduid', "$Cfduid", '/', "$BaseUrl")
$session.Cookies.Add($cookie)
$cookie = New-Object System.Net.Cookie('cf_clearance', "$Cfclearance", '/', "$BaseUrl")
$session.Cookies.Add($cookie)
$session.UserAgent = $UserAgent

Write-Output $session
}
}

0 comments on commit fba887e

Please sign in to comment.