Commit Graph

7 Commits

Author SHA1 Message Date
evazion
d9a8fc99bc javascript: change Cookie.put to take expiry in seconds. 2020-12-31 06:50:10 -06:00
evazion
23f6b8a46d js: refactor Cookie.put.
* Set Max-Age= flag instead of Expires= flag.
* Set Secure flag when using HTTPS.
* Extend default cookie lifetime from 1 year to 20 years.
* Remove "session" expiration option (unused).
* Remove max cookie size check.

The cookie size check was previously added in #2518 to deal with running
out of space due to tag scripts and blacklists. This should no longer
happen since we no longer use cookies for these things. Remove the
warning because it should never happen, we can't fix it if it does, and
the user probably won't know how to fix it either.
2020-12-14 15:39:17 -06:00
evazion
df1404b673 js: set SameSite=Lax on cookies set by Javascript.
This is the new default for most browsers nowadays. Fixes a warning in
Firefox about using SameSite=None without the Secure flag.
2020-12-14 15:37:58 -06:00
evazion
f72b32b27b Fix eslint warnings. 2018-08-05 18:30:25 -05:00
evazion
5de0bd2ebb cookie.js: remove unused code.
Unused since 65a87941.
2018-08-04 18:14:54 -05:00
evazion
7c524f867b Fix more missing Utility imports (#3791). 2018-08-04 11:37:25 -05:00
Albert Yi
6fa0ae2cf1 Migrate assets to use Webpacker 2018-07-27 15:24:05 -07:00