Returns 404 if webclient is supposed to be disabled.

This commit is contained in:
Johnny 2018-10-30 20:14:58 +00:00
parent d584fda9e6
commit 09d982eb48
2 changed files with 18 additions and 0 deletions

View file

@ -5,6 +5,8 @@ page and serve it eventual static content.
"""
from __future__ import print_function
from django.conf import settings
from django.http import Http404
from django.shortcuts import render
from django.contrib.auth import login, authenticate
@ -19,6 +21,10 @@ def webclient(request):
"""
# auto-login is now handled by evennia.web.utils.middleware
# check if webclient should be enabled
if not settings.WEBCLIENT_ENABLED:
raise Http404
# make sure to store the browser session's hash so the webclient can get to it!
pagevars = {'browser_sessid': request.session.session_key}