From 0695cd85e14dada3c118411c3ba3740da7fe801d Mon Sep 17 00:00:00 2001
From: Hazmo <renon@disroot.org>
Date: Sun, 22 Apr 2018 11:54:35 +0000
Subject: [PATCH] Update common.py with future proof REVERSE_PROXY_TYPE setting

---
 api/config/settings/common.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/api/config/settings/common.py b/api/config/settings/common.py
index cab3b760..de1d653c 100644
--- a/api/config/settings/common.py
+++ b/api/config/settings/common.py
@@ -391,9 +391,10 @@ ATOMIC_REQUESTS = False
 USE_X_FORWARDED_HOST = True
 USE_X_FORWARDED_PORT = True
 
-# Wether we should use Apache or Nginx headers when serving audio files
+# Wether we should use Apache, Nginx (or other) headers when serving audio files
 # Default to Nginx
-USE_APACHE_HEADERS = False
+REVERSE_PROXY_TYPE = env('REVERSE_PROXY_TYPE', default='nginx')
+assert REVERSE_PROXY_TYPE in ['apache2', 'nginx'], 'Unsupported REVERSE_PROXY_TYPE'
 
 # Wether we should check user permission before serving audio files (meaning
 # return an obfuscated url)
-- 
GitLab