Skip to content

Commit

Permalink
Fix handling of cookies for absolute domains
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisliebaer committed Nov 26, 2024
1 parent f5152a4 commit e4d7130
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extension/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,12 @@ async function cookieStr(cookieLines) {
}

function buildCookieLine(cookie) {
// 2nd boolean controls subdomains, if the domain starts with a dot, flag must be TRUE
let includeSubdomains = cookie.domain.startsWith('.') ? 'TRUE' : 'FALSE';

return [
cookie.domain,
'TRUE',
includeSubdomains,
cookie.path,
cookie.httpOnly.toString().toUpperCase(),
Math.trunc(cookie.expirationDate) || 0,
Expand Down

0 comments on commit e4d7130

Please sign in to comment.