Commit 4ef135b1 by Őry Máté

circle: set unique session cookie name for different hosts

cookies of devenvs with the same domain (eg forwarded to different ports)
collide otherwise
parent b4b966f0
...@@ -22,6 +22,7 @@ from os.path import (abspath, basename, dirname, join, normpath, isfile, ...@@ -22,6 +22,7 @@ from os.path import (abspath, basename, dirname, join, normpath, isfile,
expanduser) expanduser)
from sys import path from sys import path
from subprocess import check_output from subprocess import check_output
from uuid import getnode
from django.core.exceptions import ImproperlyConfigured from django.core.exceptions import ImproperlyConfigured
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
...@@ -444,3 +445,6 @@ if graphite_host and graphite_port: ...@@ -444,3 +445,6 @@ if graphite_host and graphite_port:
GRAPHITE_URL = 'http://%s:%s/render/' % (graphite_host, graphite_port) GRAPHITE_URL = 'http://%s:%s/render/' % (graphite_host, graphite_port)
else: else:
GRAPHITE_URL = None GRAPHITE_URL = None
SESSION_COOKIE_NAME = "csessid%x" % (((getnode() // 139) ^
(getnode() % 983)) & 0xffff)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment