@@ -28,7 +28,6 @@ import { parseUrl } from "./util.js";
28
28
* @property {string } [domain] The domain of the cookie.
29
29
* @property {string } [path] The path of the cookie.
30
30
* @property {boolean } [secure] The secure flag of the cookie.
31
- * @property {boolean } [httpOnly] The HTTP-only flag of the cookie.
32
31
* @property {SameSiteType } [sameSite] The SameSite attribute of the cookie.
33
32
*/
34
33
@@ -106,12 +105,6 @@ class Cookie {
106
105
*/
107
106
secure ;
108
107
109
- /**
110
- * The HTTP-only flag of the cookie.
111
- * @type {boolean }
112
- */
113
- httpOnly ;
114
-
115
108
/**
116
109
* The SameSite attribute of the cookie.
117
110
* @type {SameSiteType }
@@ -124,9 +117,8 @@ class Cookie {
124
117
* @param {string } options.name The name of the cookie.
125
118
* @param {string } options.value The value of the cookie.
126
119
* @param {string|undefined } options.domain The domain of the cookie.
127
- * @param {string } [options.path=""] The path of the cookie.
120
+ * @param {string } [options.path="/ "] The path of the cookie.
128
121
* @param {boolean } [options.secure=false] The secure flag of the cookie.
129
- * @param {boolean } [options.httpOnly=false] The HTTP-only flag of the cookie.
130
122
* @param {SameSiteType } [options.sameSite="lax"] The SameSite attribute of the cookie.
131
123
*/
132
124
constructor ( {
@@ -135,7 +127,6 @@ class Cookie {
135
127
domain,
136
128
path = "/" ,
137
129
secure = false ,
138
- httpOnly = false ,
139
130
sameSite = "lax" ,
140
131
} ) {
141
132
assertValidDomain ( domain ) ;
@@ -155,7 +146,6 @@ class Cookie {
155
146
this . domain = /** @type {string } */ ( domain ) ;
156
147
this . path = path ;
157
148
this . secure = secure ;
158
- this . httpOnly = httpOnly ;
159
149
this . sameSite = sameSite ;
160
150
}
161
151
@@ -262,10 +252,6 @@ class Cookie {
262
252
cookieString += `; Secure` ;
263
253
}
264
254
265
- if ( this . httpOnly ) {
266
- cookieString += `; HttpOnly` ;
267
- }
268
-
269
255
return cookieString + "]" ;
270
256
}
271
257
0 commit comments