Django session lost due to calling another server via iframe

I have two development servers written with Python/Django - one API server(it's not solely an API server; it has UI and etc.), and another one is a demo app used to serve data by communicating to the API server. I invoke the demo app with iframe in the API server. After successfully getting response from the demo app, the original user session of the API server is lost(supposed to have two sessions -- one from the user of the API server, one from communication between the demo app and the API server).

Any idea what happened?


If you are running both on the same server, the session cookie might be overwritten since they both expect a sessionid cookie. If a sessionid doesn't exist a new one is generated, so when you access the outer app, you get a sessionid cookie, and that gets passed to the iframe app which doesn't recognize it and generates a new one. Try giving each app it's own unique SESSION_COOKIE_NAME

Need Your Help

Can't position div/ul on top of a previous div

html css positioning relative absolute

I am trying to setup a menu of tabs. I want it to move up so that it is just over the previous div. However, whenever i move it up, it goes underneath the previous div. I've tried changing the z...

Including “spring-security-config” into classpath makes spring hang with NoClassDef at “Aware”

spring spring-security noclassdeffounderror

I guess such error is because there are two conflicting jars in classpath. When I put into my pom these lines: