=== modified file 'django/conf/global_settings.py'
|
|
|
276 | 276 | SESSION_COOKIE_SECURE = False # Whether the session cookie should be secure (https:// only). |
277 | 277 | SESSION_SAVE_EVERY_REQUEST = False # Whether to save the session data on every request. |
278 | 278 | SESSION_EXPIRE_AT_BROWSER_CLOSE = False # Whether sessions expire when a user closes his browser. |
| 279 | SESSION_COOKIE_PATH = '/' # A string setting the path of the session cookie. |
279 | 280 | |
280 | 281 | ######### |
281 | 282 | # CACHE # |
=== modified file 'django/contrib/sessions/middleware.py'
|
|
|
109 | 109 | datetime.datetime.now() + datetime.timedelta(seconds=settings.SESSION_COOKIE_AGE)) |
110 | 110 | response.set_cookie(settings.SESSION_COOKIE_NAME, session_key, |
111 | 111 | max_age=max_age, expires=expires, domain=settings.SESSION_COOKIE_DOMAIN, |
| 112 | path=settings.SESSION_COOKIE_PATH, |
112 | 113 | secure=settings.SESSION_COOKIE_SECURE or None) |
113 | 114 | return response |
=== modified file 'docs/settings.txt'
|
|
|
752 | 752 | The name of the cookie to use for sessions. This can be whatever you want. |
753 | 753 | See the `session docs`_. |
754 | 754 | |
| 755 | SESSION_COOKIE_PATH |
| 756 | ------------------- |
| 757 | |
| 758 | Default: ``'/'`` |
| 759 | |
| 760 | The path set on the session cookie. Should match the URL path of your |
| 761 | Django installation. Useful if you want to keep other people using the same |
| 762 | domain name from accessing Django session cookies. If hosting a django |
| 763 | instance at www.example.com/foo then set path to "/foo". |
| 764 | |
755 | 765 | SESSION_COOKIE_SECURE |
756 | 766 | --------------------- |
757 | 767 | |