max-age-av = "Max-Age=" non-zero-digit *DIGIT ; In practice, both expires-av and max-age-av ; are limited to dates representable by the ; user agent. * @param {number} maxAge
(maxAge)
| 197 | * @param {number} maxAge |
| 198 | */ |
| 199 | function validateCookieMaxAge (maxAge) { |
| 200 | if (maxAge < 0) { |
| 201 | throw new Error('Invalid cookie max-age') |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | /** |
| 206 | * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 |