diff --git a/pandora/app/config.py b/pandora/app/config.py index 0e13dbba9..07da58495 100644 --- a/pandora/app/config.py +++ b/pandora/app/config.py @@ -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']] diff --git a/pandora/app/views.py b/pandora/app/views.py index bc006e02a..656a9156b 100644 --- a/pandora/app/views.py +++ b/pandora/app/views.py @@ -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(''%json.dumps(url)) diff --git a/pandora/config.0xdb.jsonc b/pandora/config.0xdb.jsonc index dd239d218..db1c2e74c 100644 --- a/pandora/config.0xdb.jsonc +++ b/pandora/config.0xdb.jsonc @@ -704,7 +704,6 @@ {"name": "Restricted", "color": [255, 192, 128]}, {"name": "Private", "color": [255, 128, 128]} ], - "sendReferrer": false, "site": { "description": "0xDB is an experimental - and to some degree imaginary - movie database. It is intended to help us rethink the future of cinema on the Internet, just as it tries to push the boundaries of what we understand as \"web applications\". What 0xDB proposes is an entirely new approach to visualizing and navigating moving images, and we hope that it can serve as a point of reference for individuals and institutions who are dealing with large collections of films.", // FIXME: "from" and "to" would be more intuitive as keys here @@ -719,6 +718,7 @@ "https": true, "id": "0xdb", "name": "0xDB", + "sendReferrer": false, "url": "0xDB.org", "videoprefix": "" }, diff --git a/pandora/config.indiancinema.jsonc b/pandora/config.indiancinema.jsonc index d2a69098d..0c0a3ad69 100644 --- a/pandora/config.indiancinema.jsonc +++ b/pandora/config.indiancinema.jsonc @@ -717,7 +717,6 @@ {"name": "Under Copyright", "color": [255, 212, 128]}, {"name": "Private", "color": [255, 128, 128]} ], - "sendReferrer": true, "site": { "description": "Indiancine.ma is an annotated online archive of Indian film. It is intended to serve as a shared resource for film scholars and enthusiasts in India and beyond.", // FIXME: "from" and "to" would be more intuitive as keys here @@ -733,6 +732,7 @@ "https": true, "id": "indiancinema", "name": "Indiancine.ma", + "sendReferrer": true, "url": "indiancine.ma", "videoprefix": "" }, diff --git a/pandora/config.padma.jsonc b/pandora/config.padma.jsonc index e7232ca18..47c1e839e 100644 --- a/pandora/config.padma.jsonc +++ b/pandora/config.padma.jsonc @@ -601,7 +601,6 @@ {"name": "Restricted", "color": [255, 192, 128]}, {"name": "Private", "color": [255, 128, 128]} ], - "sendReferrer": true, "site": { "description": "Pad.ma is an online archive of densely text-annotated video material, primarily footage and not finished films. The entire collection is searchable and viewable online, and is free to download for non-commercial use.", "email": { @@ -615,6 +614,7 @@ "https": true, "id": "padma", "name": "Pad.ma", + "sendReferrer": true, "url": "pad.ma", "videoprefix": "" }, diff --git a/pandora/config.pandora.jsonc b/pandora/config.pandora.jsonc index 045c8fa0a..e9e86417b 100644 --- a/pandora/config.pandora.jsonc +++ b/pandora/config.pandora.jsonc @@ -516,7 +516,6 @@ {"name": "Restricted", "color": [255, 192, 128]}, {"name": "Private", "color": [255, 128, 128]} ], - "sendReferrer": true, "site": { "description": "This is a demo of pan.do/ra - a free, open source media archive. It allows you to manage large, decentralized collections of video, to collaboratively create metadata and time-based annotations, and to serve your archive as a cutting-edge web application.", "email": { @@ -530,6 +529,7 @@ "https": false, "id": "pandora", "name": "Demo", + "sendReferrer": true, "url": "pandora.local", "videoprefix": "" },