Description
As part of their third-party cookie crackdown, Chrome will start requiring partitioned cookies for content in an iframe at some point in the future. So far only Chrome and derived browsers support this, but according to my testing other browsers accept and ignore the Partitioned
attribute, so it should be safe to add.
My current goal is to future-proof a library that serves Dash apps in iframes and requires session cookies, and without built-in support the simplest solution I can find is to monkey-patch werkzeug.sansio.response.dump_cookie
🙈
This functionality is effectively an extension of (and only relevant when) SameSite=None
so I could imagine it being implemented as samesite = "None; Partitioned"
(in the session cookie context, app.config["SESSION_COOKIE_SAMESITE"] = "None; Partitioned"
) if you feel a separate attribute (partitioned = True
and app.config["SESSION_COOKIE_PARTITIONED"] = True
) would be excessive.
Activity