Changeset a586682


Ignore:
Timestamp:
Dec 12, 2011, 8:14:38 PM (15 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage, test-hooks
Children:
af41d4d
Parents:
4d6fe00
git-author:
Alex Dehnert <adehnert@…> (12/12/11 20:14:38)
git-committer:
Alex Dehnert <adehnert@…> (12/12/11 20:14:38)
Message:

Set cookie names

At the moment, we have several differet deployments of the ASA DB,
for various purposes. Two major ones are hosted on asa.mit.edu, at
/forms/ and /db2.0/. Unfortunately, use of the default cookie names
mean that you can't use the two sites simultaneously --- logging into
one will set the sessionid cookie to a site-specific value, which means
that the other site's value will no longer be there.

This allows setting a prefix for the cookie name. By setting this to
a different value for each deployment, we can avoid /forms/ logging out
/db2.0/, and vice-versa.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/settings.py

    rd6f7d1a ra586682  
    2525ENABLE_SCRIPTS_AUTH = True
    2626
     27COOKIES_PREFIX = "asadb_"
    2728SESSION_COOKIE_SECURE = True
    2829SESSION_COOKIE_HTTPONLY = True
     
    5051
    5152from local_settings import *
     53
     54SESSION_COOKIE_NAME = COOKIES_PREFIX + "sessionid"
     55CSRF_COOKIE_NAME = COOKIES_PREFIX + "csrftoken"
    5256
    5357# Absolute path to the directory that holds media.
Note: See TracChangeset for help on using the changeset viewer.