<div dir="ltr">Hi,<div><br></div><div>I am looking for the followings:</div><div>* Force twisted.web to set session cookie as secured when HTTPS is used.</div><div>* Allow 2 separate twisted.web Sites to run on same host/IP but with different sessions.</div>

<div><br></div><div>I have checked the current code for getSession() [1] but i can see that session cookie is harcoded and I don't know how to use self.sitepath .<br clear="all"><div><br></div><div>I tried to search the code for sitepath, but I only got this comment, which I things is used to suppport some some sort of load balancing / high availability.</div>

<div><br></div><div><div># Sitepath is used to determine cookie names between distributed</div><div># servers and disconnected sites.</div></div><div><br></div><div>Can this be done with current code?</div><div><br></div>

<div>If not, I am happy to submit a ticket and a patch.</div><div><br></div><div>To solve my problems I rewrote getSession to not use harcoded session name and to check for self.isSecure before setting a new session cookie.</div>

<div><br></div><div>Many thanks!</div><div><br></div><div>[1] <a href="https://github.com/twisted/twisted/blob/trunk/twisted/web/server.py#L384">https://github.com/twisted/twisted/blob/trunk/twisted/web/server.py#L384<br>

</a>-- </div>Adi Roiban
</div></div>