mirror of
https://github.com/tubearchivist/browser-extension.git
synced 2025-02-05 15:40:14 +00:00
Fix handling of cookies for absolute domains (#50)
This commit is contained in:
parent
f5152a4717
commit
ea12e6bc08
@ -195,9 +195,12 @@ async function cookieStr(cookieLines) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function buildCookieLine(cookie) {
|
function buildCookieLine(cookie) {
|
||||||
|
// 2nd argument controls subdomains, and must match leading dot in domain
|
||||||
|
let includeSubdomains = cookie.domain.startsWith('.') ? 'TRUE' : 'FALSE';
|
||||||
|
|
||||||
return [
|
return [
|
||||||
cookie.domain,
|
cookie.domain,
|
||||||
'TRUE',
|
includeSubdomains,
|
||||||
cookie.path,
|
cookie.path,
|
||||||
cookie.httpOnly.toString().toUpperCase(),
|
cookie.httpOnly.toString().toUpperCase(),
|
||||||
Math.trunc(cookie.expirationDate) || 0,
|
Math.trunc(cookie.expirationDate) || 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user