'Chromium doesn't send cookie to remote host in kiosk mode in an iframe

I have a local application located on localhost without https. The web app uses an iframe to communicate with a remote web hosted app.

There are new restrictions in newer version of chrome that makes it a bit harder to work with iframes in a cross site environment.

In order to make the webapp work again, I had to set SameSite=None in the cookie header. And to add an header Content-Security-Policy "frame-ancestors http://127.0.0.1:3000";.

This works when the chrome browser isn't used in kiosk mode, but when I start it in kiosk mode, the remote site does load in the iframe. But cookies aren't sent on http requests even if they are received from previous http request.

Any idea why the kiosk mode wouldn't work but the same browser in normal mode works?

The chromium browser in kiosk mode is started with those parameters:

WEBKIT_DISABLE_TBS=1 /usr/bin/chromium-browser \
        --disable-plugins \
        --disable-suggestions-service \
        --disable-save-password-bubble \
        --disable-default-apps \
        --disable-extensions \
        --disable-sync \
        --disable-add-to-homescreen \
        --bwsi \
        --disable-translate \
        --disable-component-update \
        --aggressive-cache-discard \
        --disable-notifications \
        --disable-application-cache \
        --incognito \
        --remote-debugging-port=9222 \
        --kiosk \
        $URL


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source