forked from 0x2620/pandora
move sendReferrer into site, fixes #2505
This commit is contained in:
parent
5a57af8dd1
commit
dd2fca85a4
6 changed files with 7 additions and 5 deletions
|
|
@ -62,6 +62,8 @@ def load_config():
|
|||
config['site']['dontValidateUser'] = not settings.AUTH_CHECK_USERNAME
|
||||
if not 'folderdepth' in config['site']:
|
||||
config['site']['folderdepth'] = settings.USE_IMDB and 4 or 3
|
||||
if 'sendReferrer' in config and not 'sendReferrer' in config['site']:
|
||||
config['site']['sendReferrer'] = config.pop('sendReferrer')
|
||||
|
||||
# enable default filters if needed
|
||||
default_filters = [f['id'] for f in config['user']['ui']['filters']]
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ def redirect_url(request, url):
|
|||
if request.META['QUERY_STRING']:
|
||||
url += "?" + request.META['QUERY_STRING']
|
||||
|
||||
if settings.CONFIG.get('sendReferrer', False):
|
||||
if settings.CONFIG['site'].get('sendReferrer', False):
|
||||
return redirect(url)
|
||||
else:
|
||||
return HttpResponse('<script>document.location.href=%s;</script>'%json.dumps(url))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue