Skip to content

Commit

Permalink
Merge pull request #11 from lmachens:lmachens/issue10
Browse files Browse the repository at this point in the history
🐛 Accept Cookie on Primevideo website
  • Loading branch information
lmachens authored Mar 30, 2022
2 parents 789d6ca + 496dd86 commit 9e4bf99
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 18 deletions.
34 changes: 17 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@electron-forge/maker-rpm": "^6.0.0-beta.63",
"@electron-forge/maker-squirrel": "^6.0.0-beta.63",
"@electron-forge/maker-zip": "^6.0.0-beta.63",
"electron": "^17.0.0",
"electron": "^18.0.0",
"electronmon": "^2.0.2"
},
"dependencies": {
Expand Down
18 changes: 18 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,24 @@ const createWindow = () => {
} else if (details.responseHeaders["x-frame-options"]) {
delete details.responseHeaders["x-frame-options"];
}
if (
details.responseHeaders["Set-Cookie"]?.length &&
!details.responseHeaders["Set-Cookie"][0].includes(
"SameSite=none"
)
) {
details.responseHeaders["Set-Cookie"][0] =
details.responseHeaders["Set-Cookie"][0] + "; SameSite=none";
}
if (
details.responseHeaders["set-cookie"]?.length &&
!details.responseHeaders["set-cookie"][0].includes(
"SameSite=none"
)
) {
details.responseHeaders["set-cookie"][0] =
details.responseHeaders["set-cookie"][0] + "; SameSite=none";
}

callback({
cancel: false,
Expand Down

0 comments on commit 9e4bf99

Please sign in to comment.