summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--frontend/templates/profile.html2
-rw-r--r--frontend/templates/roomlist.html2
-rw-r--r--frontend/views.py14
-rw-r--r--scannerjammer/settings.py3
4 files changed, 13 insertions, 8 deletions
diff --git a/frontend/templates/profile.html b/frontend/templates/profile.html
index 8d1e4aa..7deb845 100644
--- a/frontend/templates/profile.html
+++ b/frontend/templates/profile.html
@@ -117,7 +117,7 @@
</body>
<script type="text/javascript">document.getElementById("plea").style.display="none"</script>
<script type="text/javascript">
- serverHost = "scannerjammer.fm"
+ serverHost = "{{SERVER_HOST}}"
serverPort = 80
var userVideoQueue = {{VIDZ|safe}}
var userVideoQueueTitle = "my scans"
diff --git a/frontend/templates/roomlist.html b/frontend/templates/roomlist.html
index 94b3f63..071f4d0 100644
--- a/frontend/templates/roomlist.html
+++ b/frontend/templates/roomlist.html
@@ -66,7 +66,7 @@
</section>
</body>
<script type="text/javascript">
- var serverHost = "scannerjammer.fm";
+ var serverHost = "{{SERVER_HOST}}";
var serverPort = 80;
var ROOM_LIST = {{ROOM_LIST|safe}};
</script>
diff --git a/frontend/views.py b/frontend/views.py
index 9fec138..9285a35 100644
--- a/frontend/views.py
+++ b/frontend/views.py
@@ -65,7 +65,7 @@ def bg(request):
return render_to_response(
'backgrounds.html',
{
- 'SERVER_HOST': settings.SERVER_HOST,
+ 'SERVER_HOST': request.get_host(),
'SERVER_PORT': settings.SERVER_PORT,
'lowest_id': backgrounds[limit - 1].id,
'backgrounds': filtered_backgrounds,
@@ -87,7 +87,7 @@ def topvideos(request):
response = render_to_response(
'topvideos.html',
{
- 'SERVER_HOST': settings.SERVER_HOST,
+ 'SERVER_HOST': request.get_host(),
'SERVER_PORT': settings.SERVER_PORT,
'top_today': json.dumps(videos_response_list(top_today)),
'top_yesterday': json.dumps(videos_response_list(top_yesterday)),
@@ -107,7 +107,7 @@ def directory(request):
response = render_to_response(
'directory.html',
{
- 'SERVER_HOST': settings.SERVER_HOST,
+ 'SERVER_HOST': request.get_host(),
'SERVER_PORT': settings.SERVER_PORT,
'directory': json.dumps(r),
}
@@ -155,7 +155,7 @@ def profile(request, username):
response = render_to_response(
'profile.html',
{
- 'SERVER_HOST': settings.SERVER_HOST,
+ 'SERVER_HOST': request.get_host(),
'SERVER_PORT': settings.SERVER_PORT,
'NAME': userprofile.nickname,
'UCNAME': userprofile.nickname.upper(),
@@ -187,6 +187,8 @@ def roomlist(request):
response = render_to_response(
'roomlist.html',
{
+ 'SERVER_HOST': request.get_host(),
+ 'SERVER_PORT': settings.SERVER_PORT,
'ROOM_LIST': json.dumps(roomlist),
}
)
@@ -215,7 +217,7 @@ def room(request, roomname):
response = render_to_response(
'room.html',
{
- 'SERVER_HOST': settings.SERVER_HOST,
+ 'SERVER_HOST': request.get_host(),
'SERVER_PORT': settings.SERVER_PORT,
'JS_PATH': jsPath,
'ROOM': sjroom.name.lower(),
@@ -231,7 +233,7 @@ def faq(request):
response = render_to_response(
'faq.html',
{
- 'SERVER_HOST': settings.SERVER_HOST,
+ 'SERVER_HOST': request.get_host(),
'SERVER_PORT': settings.SERVER_PORT,
}
)
diff --git a/scannerjammer/settings.py b/scannerjammer/settings.py
index 7ed93f3..46b12e0 100644
--- a/scannerjammer/settings.py
+++ b/scannerjammer/settings.py
@@ -166,3 +166,6 @@ START_TIME = datetime.now()
#SERVER_HOST = 'http://localhost'
SERVER_HOST = 'scannerjammer.fm'
SERVER_PORT = 80
+
+SESSION_COOKIE_DOMAIN=".scannerjammer.fm"
+USE_X_FORWARDED_HOST=True