Skip to content

Commit

Permalink
capricorn86#666@patch: Typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mas0nShi committed Nov 30, 2022
1 parent 643e199 commit 1592878
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/happy-dom/src/cookie/CookieJar.ts
Expand Up @@ -16,11 +16,11 @@ export default class CookieJar {
* @param cookie
*/
private validateCookie(cookie: Cookie): boolean {
if (cookie.key.toLocaleUpperCase().startsWith('__secure-') && !cookie.isSecure()) {
if (cookie.key.toLowerCase().startsWith('__secure-') && !cookie.isSecure()) {
return false;
}
if (
cookie.key.toLocaleUpperCase().startsWith('__host-') &&
cookie.key.toLowerCase().startsWith('__host-') &&
(!cookie.isSecure() || cookie.path !== '/' || cookie.domain)
) {
return false;
Expand Down

0 comments on commit 1592878

Please sign in to comment.