Skip to content
Snippets Groups Projects
Commit 6147ae97 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

django settings improvements: put configuration specific to production and tests in adequate files

parent 838f9858
No related branches found
Tags v0.0.92
No related merge requests found
......@@ -35,8 +35,7 @@ SECRET_KEY = swh_web_config['secret_key']
DEBUG = swh_web_config['debug']
DEBUG_PROPAGATE_EXCEPTIONS = swh_web_config['debug']
ALLOWED_HOSTS = ['127.0.0.1', 'localhost', 'testserver',
'archive.softwareheritage.org']
ALLOWED_HOSTS = ['127.0.0.1', 'localhost']
# Application definition
......@@ -192,7 +191,3 @@ LOGGING = {
}
SILENCED_SYSTEM_CHECKS = ['1_7.W001', '1_8.W001']
# Setup support for proxy headers
USE_X_FORWARDED_HOST = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
......@@ -13,3 +13,9 @@ CACHES = {
'LOCATION': swh_web_config['throttling']['cache_uri'],
}
}
# Setup support for proxy headers
USE_X_FORWARDED_HOST = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
ALLOWED_HOSTS += ['archive.softwareheritage.org'] # noqa
......@@ -33,4 +33,6 @@ swh_web_config.update({
}
})
from .common import *
\ No newline at end of file
from .common import *
ALLOWED_HOSTS += ['testserver'] # noqa
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment