How to set cookie for iframe in the same domain

I am trying to integrate etherpad-lite into CMS Plone following example 1 of the official documentation http://etherpad.org/doc/v1.2.7/

Portal places the cookie "sessionID" with the given value on the client and creates an iframe including the pad. 

Everything is going well, with the exception of cookies. Reading the documentation is the best thing, it seems to make etherpad-lite in the same domain in a specific path. This is what I did with / pad / path.

The plone side, if the session was not created, I created it, add a cookie, and then redirect to the same page to make sure the cookie is in the browser.

As a result, my cookie is added to the homepage request, but not exchanged iframe request.

Here's the Chrome Chrome consoleโ€™s network tab for the homepage and iframe:

http://toutpt.makina-corpus.org/en/images/cookie-in-iframe/

The code corresponding to setCookie is located at https://github.com/toutpt/collective.etherpad/blob/master/collective/etherpad/archetypes.py#L100

+6
source share
1 answer

For posterity, here the answer from @AskoSoukka is identified and "accepted" in the comments above:

What does the actual cookie stored in your browser look like? Perhaps you need to explicitly specify path = "/" in setCookie kwargs so that it works for the entire domain.

+1
source

All Articles