preface

The new version of Chrome adds a feature called Samesite, which disallows iframes from setting cookies.

If we need login authentication in an iframe, it’s a hassle. This can be resolved by disabling this feature.

example

The browser console prompts:

A cookie associated with a cross-site resource at http://58.211.78.91/ was set without the `SameSite` attribute. It has been blocked, as Chrome now only delivers cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/… and https://www.chromestatus.com/…

If the above is prompted in the browser and the request is in the iframe, the following happens:

It’s almost certainly a _SameSite problem. _

To solve

Chrome access Chrome ://flags/, search _SameSite, find SameSite by default cookies, which is for Disabled, then: _

The effect is to disable the browser’s Samesite functionality.