Skip to content

Commit f962723

Browse files
author
Christian Vögl
committed
Switched to production settings
set debug to false, added some unproblematic security settings, according to manage.py check --deploy also removed a local test ip from the settings file
1 parent 3b52bdc commit f962723

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

orthos2/orthos2/settings.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,23 @@
2323
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
2424

2525

26-
# Quick-start development settings - unsuitable for production
27-
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
26+
2827

2928
# SECURITY WARNING: keep the secret key used in production secret!
29+
# SECURITY Warning: You probably want to load this from a file / environment variable
3030
SECRET_KEY = '$@c7_nq(oi56nl3*-!_(=&-j_=n3=^2f5dydr4chxlwckg_947'
3131

3232
# SECURITY WARNING: don't run with debug turned on in production!
33-
DEBUG = True
34-
35-
ALLOWED_HOSTS = ['localhost', '127.0.0.1', gethostname(), getfqdn(), '10.162.227.40']
36-
33+
DEBUG = False
34+
# Repalace with the domain / ip of your orthos server:
35+
ALLOWED_HOSTS = ['localhost', '127.0.0.1', gethostname(), getfqdn()]
36+
37+
# recomended security settings:
38+
CSRF_COOKIE_SECURE = True
39+
SESSION_COOKIE_SECURE = True
40+
SECURE_CONTENT_TYPE_NOSNIFF = True
41+
SECURE_BROWSER_XSS_FILTER = True
42+
X_FRAME_OPTIONS = 'DENY'
3743
# Application definition
3844

3945
INSTALLED_APPS = [

0 commit comments

Comments
 (0)