Returns 404 if webclient is supposed to be disabled.
This commit is contained in:
parent
d584fda9e6
commit
09d982eb48
2 changed files with 18 additions and 0 deletions
|
|
@ -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}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue