Skip to content

Commit b10cd7f

Browse files
authored
fix(cookies): only send expires param on web if a date is set
1 parent a125498 commit b10cd7f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/src/core-plugins.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export class CapacitorCookiesPluginWeb extends WebPlugin implements CapacitorCoo
110110
const encodedValue = encode(options.value);
111111

112112
// Clean & sanitize options
113-
const expires = `; expires=${(options.expires || '').replace('expires=', '')}`; // Default is "; expires="
113+
const expires = options.expires ? `; expires=${options.expires.replace('expires=', '')}` : '';
114114

115115
const path = (options.path || '/').replace('path=', ''); // Default is "path=/"
116116
const domain = options.url != null && options.url.length > 0 ? `domain=${options.url}` : '';

0 commit comments

Comments
 (0)