We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Rest API just generate HTTP urls
next links (List Views) and absolute urls are generated to HTTP protocol because the all requests are make in port 80.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 from setuptools import setup, find_packages
2 
3 
4 setup(
5     name='bothub',
6     version='1.15.0',
7     description='bothub',
8     packages=find_packages(),
9     install_requires=[
10         'python-decouple',
11         'requests',
12         'django==2.0.6',
13         'djangorestframework==3.7.7',
14         'whitenoise',
15         'dj-database-url',
16         'django-cors-headers',
17         'django-filter',
18         'coreapi',
19     ],
20     python_requires='>=3.6',
21 )
22
```

Path: `bothub/settings.py`
Content:
```
1 import os
2 import dj_database_url
3 
4 from decouple import config
5 from django.utils.log import DEFAULT_LOGGING
6 
7 from .utils import cast_supported_languages
8 from .utils import cast_empty_str_to_none
9 
10 
11 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
12 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
13 
14 
15 # SECURITY WARNING: keep the secret key used in production secret!
16 SECRET_KEY = config('SECRET_KEY')
17 
18 # SECURITY WARNING: don't run with debug turned on in production!
19 DEBUG = config('DEBUG', default=False, cast=bool)
20 
21 ALLOWED_HOSTS = config(
22     'ALLOWED_HOSTS',
23     default='*',
24     cast=lambda v: [s.strip() for s in v.split(',')])
25 
26 
27 # Application definition
28 
29 INSTALLED_APPS = [
30     'django.contrib.admin',
31     'django.contrib.auth',
32     'django.contrib.contenttypes',
33     'django.contrib.sessions',
34     'django.contrib.messages',
35     'django.contrib.staticfiles',
36     'rest_framework',
37     'rest_framework.authtoken',
38     'django_filters',
39     'corsheaders',
40     'bothub.authentication',
41     'bothub.common',
42     'bothub.api',
43 ]
44 
45 MIDDLEWARE = [
46     'django.middleware.security.SecurityMiddleware',
47     'whitenoise.middleware.WhiteNoiseMiddleware',
48     'django.contrib.sessions.middleware.SessionMiddleware',
49     'corsheaders.middleware.CorsMiddleware',
50     'django.middleware.common.CommonMiddleware',
51     'django.middleware.csrf.CsrfViewMiddleware',
52     'django.contrib.auth.middleware.AuthenticationMiddleware',
53     'django.contrib.messages.middleware.MessageMiddleware',
54     'django.middleware.clickjacking.XFrameOptionsMiddleware',
55 ]
56 
57 ROOT_URLCONF = 'bothub.urls'
58 
59 TEMPLATES = [
60     {
61         'BACKEND': 'django.template.backends.django.DjangoTemplates',
62         'DIRS': [],
63         'APP_DIRS': True,
64         'OPTIONS': {
65             'context_processors': [
66                 'django.template.context_processors.debug',
67                 'django.template.context_processors.request',
68                 'django.contrib.auth.context_processors.auth',
69                 'django.contrib.messages.context_processors.messages',
70             ],
71         },
72     },
73 ]
74 
75 WSGI_APPLICATION = 'bothub.wsgi.application'
76 
77 
78 # Database
79 
80 DATABASES = {}
81 DATABASES['default'] = dj_database_url.parse(
82     config(
83         'DEFAULT_DATABASE',
84         default='sqlite:///db.sqlite3'))
85 
86 
87 # Auth
88 
89 AUTH_USER_MODEL = 'authentication.User'
90 
91 
92 # Password validation
93 
94 AUTH_PASSWORD_VALIDATORS = [
95     {
96         'NAME': 'django.contrib.auth.password_validation.' +
97         'UserAttributeSimilarityValidator',
98     },
99     {
100         'NAME': 'django.contrib.auth.password_validation.' +
101         'MinimumLengthValidator',
102     },
103     {
104         'NAME': 'django.contrib.auth.password_validation.' +
105         'CommonPasswordValidator',
106     },
107     {
108         'NAME': 'django.contrib.auth.password_validation.' +
109         'NumericPasswordValidator',
110     },
111 ]
112 
113 
114 # Internationalization
115 
116 LANGUAGE_CODE = config('LANGUAGE_CODE', default='en-us')
117 
118 TIME_ZONE = config('TIME_ZONE', default='UTC')
119 
120 USE_I18N = True
121 
122 USE_L10N = True
123 
124 USE_TZ = True
125 
126 
127 # Static files (CSS, JavaScript, Images)
128 
129 STATIC_URL = config('STATIC_URL', default='/static/')
130 
131 STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
132 
133 STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
134 
135 
136 # rest framework
137 
138 REST_FRAMEWORK = {
139     'DEFAULT_AUTHENTICATION_CLASSES': [
140         'rest_framework.authentication.TokenAuthentication',
141     ],
142     'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.' +
143     'LimitOffsetPagination',
144     'PAGE_SIZE': 20,
145     'DEFAULT_FILTER_BACKENDS': [
146         'django_filters.rest_framework.DjangoFilterBackend',
147     ],
148     'DEFAULT_METADATA_CLASS': 'bothub.api.metadata.Metadata',
149 }
150 
151 
152 # cors headers
153 
154 CORS_ORIGIN_ALLOW_ALL = True
155 
156 
157 # mail
158 
159 envvar_EMAIL_HOST = config(
160     'EMAIL_HOST',
161     default=None,
162     cast=cast_empty_str_to_none)
163 
164 ADMINS = config(
165     'ADMINS',
166     default='',
167     cast=lambda v: [
168         (
169             s.strip().split('|')[0],
170             s.strip().split('|')[1],
171         ) for s in v.split(',')] if v else [])
172 EMAIL_SUBJECT_PREFIX = '[bothub] '
173 DEFAULT_FROM_EMAIL = config(
174     'DEFAULT_FROM_EMAIL',
175     default='webmaster@localhost')
176 SERVER_EMAIL = config('SERVER_EMAIL', default='root@localhost')
177 
178 if envvar_EMAIL_HOST:
179     EMAIL_HOST = envvar_EMAIL_HOST
180     EMAIL_PORT = config('EMAIL_PORT', default=25, cast=int)
181     EMAIL_HOST_USER = config('EMAIL_HOST_USER', default='')
182     EMAIL_HOST_PASSWORD = config('EMAIL_HOST_PASSWORD', default='')
183     EMAIL_USE_SSL = config('EMAIL_USE_SSL', default=False, cast=bool)
184     EMAIL_USE_TLS = config('EMAIL_USE_TLS', default=False, cast=bool)
185 else:
186     EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
187 
188 SEND_EMAILS = config('SEND_EMAILS', default=True, cast=bool)
189 
190 
191 # webapp
192 
193 BOTHUB_WEBAPP_BASE_URL = config(
194     'BOTHUB_WEBAPP_BASE_URL',
195     default='http://localhost:8080/')
196 
197 
198 # NLP
199 
200 BOTHUB_NLP_BASE_URL = config(
201     'BOTHUB_NLP_BASE_URL',
202     default='http://localhost:2657/')
203 
204 
205 # CSRF
206 
207 CSRF_COOKIE_DOMAIN = config(
208     'CSRF_COOKIE_DOMAIN',
209     default=None,
210     cast=cast_empty_str_to_none)
211 
212 CSRF_COOKIE_SECURE = config(
213     'CSRF_COOKIE_SECURE',
214     default=False,
215     cast=bool)
216 
217 
218 # Logging
219 
220 LOGGING = DEFAULT_LOGGING
221 LOGGING['formatters']['bothub.health'] = {
222     'format': '[bothub.health] {message}',
223     'style': '{',
224 }
225 LOGGING['handlers']['bothub.health'] = {
226     'level': 'DEBUG',
227     'class': 'logging.StreamHandler',
228     'formatter': 'bothub.health',
229 }
230 LOGGING['loggers']['bothub.health.checks'] = {
231     'handlers': ['bothub.health'],
232     'level': 'DEBUG',
233 }
234 
235 
236 # Supported Languages
237 
238 SUPPORTED_LANGUAGES = config(
239     'SUPPORTED_LANGUAGES',
240     default='en|pt',
241     cast=cast_supported_languages)
242
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/bothub/settings.py b/bothub/settings.py
--- a/bothub/settings.py
+++ b/bothub/settings.py
@@ -239,3 +239,8 @@
     'SUPPORTED_LANGUAGES',
     default='en|pt',
     cast=cast_supported_languages)
+
+
+# SECURE PROXY SSL HEADER
+
+SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@
 
 setup(
     name='bothub',
-    version='1.15.0',
+    version='1.15.1',
     description='bothub',
     packages=find_packages(),
     install_requires=[

{"golden_diff": "diff --git a/bothub/settings.py b/bothub/settings.py\n--- a/bothub/settings.py\n+++ b/bothub/settings.py\n@@ -239,3 +239,8 @@\n     'SUPPORTED_LANGUAGES',\n     default='en|pt',\n     cast=cast_supported_languages)\n+\n+\n+# SECURE PROXY SSL HEADER\n+\n+SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')\ndiff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -3,7 +3,7 @@\n \n setup(\n     name='bothub',\n-    version='1.15.0',\n+    version='1.15.1',\n     description='bothub',\n     packages=find_packages(),\n     install_requires=[\n", "issue": "Rest API just generate HTTP urls\nnext links (List Views) and absolute urls are generated to HTTP protocol because the all requests are make in port 80.\n", "before_files": [{"content": "from setuptools import setup, find_packages\n\n\nsetup(\n    name='bothub',\n    version='1.15.0',\n    description='bothub',\n    packages=find_packages(),\n    install_requires=[\n        'python-decouple',\n        'requests',\n        'django==2.0.6',\n        'djangorestframework==3.7.7',\n        'whitenoise',\n        'dj-database-url',\n        'django-cors-headers',\n        'django-filter',\n        'coreapi',\n    ],\n    python_requires='>=3.6',\n)\n", "path": "setup.py"}, {"content": "import os\nimport dj_database_url\n\nfrom decouple import config\nfrom django.utils.log import DEFAULT_LOGGING\n\nfrom .utils import cast_supported_languages\nfrom .utils import cast_empty_str_to_none\n\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = config('SECRET_KEY')\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = config('DEBUG', default=False, cast=bool)\n\nALLOWED_HOSTS = config(\n    'ALLOWED_HOSTS',\n    default='*',\n    cast=lambda v: [s.strip() for s in v.split(',')])\n\n\n# Application definition\n\nINSTALLED_APPS = [\n    'django.contrib.admin',\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.messages',\n    'django.contrib.staticfiles',\n    'rest_framework',\n    'rest_framework.authtoken',\n    'django_filters',\n    'corsheaders',\n    'bothub.authentication',\n    'bothub.common',\n    'bothub.api',\n]\n\nMIDDLEWARE = [\n    'django.middleware.security.SecurityMiddleware',\n    'whitenoise.middleware.WhiteNoiseMiddleware',\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'corsheaders.middleware.CorsMiddleware',\n    'django.middleware.common.CommonMiddleware',\n    'django.middleware.csrf.CsrfViewMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    'django.contrib.messages.middleware.MessageMiddleware',\n    'django.middleware.clickjacking.XFrameOptionsMiddleware',\n]\n\nROOT_URLCONF = 'bothub.urls'\n\nTEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': [],\n        'APP_DIRS': True,\n        'OPTIONS': {\n            'context_processors': [\n                'django.template.context_processors.debug',\n                'django.template.context_processors.request',\n                'django.contrib.auth.context_processors.auth',\n                'django.contrib.messages.context_processors.messages',\n            ],\n        },\n    },\n]\n\nWSGI_APPLICATION = 'bothub.wsgi.application'\n\n\n# Database\n\nDATABASES = {}\nDATABASES['default'] = dj_database_url.parse(\n    config(\n        'DEFAULT_DATABASE',\n        default='sqlite:///db.sqlite3'))\n\n\n# Auth\n\nAUTH_USER_MODEL = 'authentication.User'\n\n\n# Password validation\n\nAUTH_PASSWORD_VALIDATORS = [\n    {\n        'NAME': 'django.contrib.auth.password_validation.' +\n        'UserAttributeSimilarityValidator',\n    },\n    {\n        'NAME': 'django.contrib.auth.password_validation.' +\n        'MinimumLengthValidator',\n    },\n    {\n        'NAME': 'django.contrib.auth.password_validation.' +\n        'CommonPasswordValidator',\n    },\n    {\n        'NAME': 'django.contrib.auth.password_validation.' +\n        'NumericPasswordValidator',\n    },\n]\n\n\n# Internationalization\n\nLANGUAGE_CODE = config('LANGUAGE_CODE', default='en-us')\n\nTIME_ZONE = config('TIME_ZONE', default='UTC')\n\nUSE_I18N = True\n\nUSE_L10N = True\n\nUSE_TZ = True\n\n\n# Static files (CSS, JavaScript, Images)\n\nSTATIC_URL = config('STATIC_URL', default='/static/')\n\nSTATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')\n\nSTATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'\n\n\n# rest framework\n\nREST_FRAMEWORK = {\n    'DEFAULT_AUTHENTICATION_CLASSES': [\n        'rest_framework.authentication.TokenAuthentication',\n    ],\n    'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.' +\n    'LimitOffsetPagination',\n    'PAGE_SIZE': 20,\n    'DEFAULT_FILTER_BACKENDS': [\n        'django_filters.rest_framework.DjangoFilterBackend',\n    ],\n    'DEFAULT_METADATA_CLASS': 'bothub.api.metadata.Metadata',\n}\n\n\n# cors headers\n\nCORS_ORIGIN_ALLOW_ALL = True\n\n\n# mail\n\nenvvar_EMAIL_HOST = config(\n    'EMAIL_HOST',\n    default=None,\n    cast=cast_empty_str_to_none)\n\nADMINS = config(\n    'ADMINS',\n    default='',\n    cast=lambda v: [\n        (\n            s.strip().split('|')[0],\n            s.strip().split('|')[1],\n        ) for s in v.split(',')] if v else [])\nEMAIL_SUBJECT_PREFIX = '[bothub] '\nDEFAULT_FROM_EMAIL = config(\n    'DEFAULT_FROM_EMAIL',\n    default='webmaster@localhost')\nSERVER_EMAIL = config('SERVER_EMAIL', default='root@localhost')\n\nif envvar_EMAIL_HOST:\n    EMAIL_HOST = envvar_EMAIL_HOST\n    EMAIL_PORT = config('EMAIL_PORT', default=25, cast=int)\n    EMAIL_HOST_USER = config('EMAIL_HOST_USER', default='')\n    EMAIL_HOST_PASSWORD = config('EMAIL_HOST_PASSWORD', default='')\n    EMAIL_USE_SSL = config('EMAIL_USE_SSL', default=False, cast=bool)\n    EMAIL_USE_TLS = config('EMAIL_USE_TLS', default=False, cast=bool)\nelse:\n    EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'\n\nSEND_EMAILS = config('SEND_EMAILS', default=True, cast=bool)\n\n\n# webapp\n\nBOTHUB_WEBAPP_BASE_URL = config(\n    'BOTHUB_WEBAPP_BASE_URL',\n    default='http://localhost:8080/')\n\n\n# NLP\n\nBOTHUB_NLP_BASE_URL = config(\n    'BOTHUB_NLP_BASE_URL',\n    default='http://localhost:2657/')\n\n\n# CSRF\n\nCSRF_COOKIE_DOMAIN = config(\n    'CSRF_COOKIE_DOMAIN',\n    default=None,\n    cast=cast_empty_str_to_none)\n\nCSRF_COOKIE_SECURE = config(\n    'CSRF_COOKIE_SECURE',\n    default=False,\n    cast=bool)\n\n\n# Logging\n\nLOGGING = DEFAULT_LOGGING\nLOGGING['formatters']['bothub.health'] = {\n    'format': '[bothub.health] {message}',\n    'style': '{',\n}\nLOGGING['handlers']['bothub.health'] = {\n    'level': 'DEBUG',\n    'class': 'logging.StreamHandler',\n    'formatter': 'bothub.health',\n}\nLOGGING['loggers']['bothub.health.checks'] = {\n    'handlers': ['bothub.health'],\n    'level': 'DEBUG',\n}\n\n\n# Supported Languages\n\nSUPPORTED_LANGUAGES = config(\n    'SUPPORTED_LANGUAGES',\n    default='en|pt',\n    cast=cast_supported_languages)\n", "path": "bothub/settings.py"}], "after_files": [{"content": "from setuptools import setup, find_packages\n\n\nsetup(\n    name='bothub',\n    version='1.15.1',\n    description='bothub',\n    packages=find_packages(),\n    install_requires=[\n        'python-decouple',\n        'requests',\n        'django==2.0.6',\n        'djangorestframework==3.7.7',\n        'whitenoise',\n        'dj-database-url',\n        'django-cors-headers',\n        'django-filter',\n        'coreapi',\n    ],\n    python_requires='>=3.6',\n)\n", "path": "setup.py"}, {"content": "import os\nimport dj_database_url\n\nfrom decouple import config\nfrom django.utils.log import DEFAULT_LOGGING\n\nfrom .utils import cast_supported_languages\nfrom .utils import cast_empty_str_to_none\n\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = config('SECRET_KEY')\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = config('DEBUG', default=False, cast=bool)\n\nALLOWED_HOSTS = config(\n    'ALLOWED_HOSTS',\n    default='*',\n    cast=lambda v: [s.strip() for s in v.split(',')])\n\n\n# Application definition\n\nINSTALLED_APPS = [\n    'django.contrib.admin',\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.messages',\n    'django.contrib.staticfiles',\n    'rest_framework',\n    'rest_framework.authtoken',\n    'django_filters',\n    'corsheaders',\n    'bothub.authentication',\n    'bothub.common',\n    'bothub.api',\n]\n\nMIDDLEWARE = [\n    'django.middleware.security.SecurityMiddleware',\n    'whitenoise.middleware.WhiteNoiseMiddleware',\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'corsheaders.middleware.CorsMiddleware',\n    'django.middleware.common.CommonMiddleware',\n    'django.middleware.csrf.CsrfViewMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    'django.contrib.messages.middleware.MessageMiddleware',\n    'django.middleware.clickjacking.XFrameOptionsMiddleware',\n]\n\nROOT_URLCONF = 'bothub.urls'\n\nTEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': [],\n        'APP_DIRS': True,\n        'OPTIONS': {\n            'context_processors': [\n                'django.template.context_processors.debug',\n                'django.template.context_processors.request',\n                'django.contrib.auth.context_processors.auth',\n                'django.contrib.messages.context_processors.messages',\n            ],\n        },\n    },\n]\n\nWSGI_APPLICATION = 'bothub.wsgi.application'\n\n\n# Database\n\nDATABASES = {}\nDATABASES['default'] = dj_database_url.parse(\n    config(\n        'DEFAULT_DATABASE',\n        default='sqlite:///db.sqlite3'))\n\n\n# Auth\n\nAUTH_USER_MODEL = 'authentication.User'\n\n\n# Password validation\n\nAUTH_PASSWORD_VALIDATORS = [\n    {\n        'NAME': 'django.contrib.auth.password_validation.' +\n        'UserAttributeSimilarityValidator',\n    },\n    {\n        'NAME': 'django.contrib.auth.password_validation.' +\n        'MinimumLengthValidator',\n    },\n    {\n        'NAME': 'django.contrib.auth.password_validation.' +\n        'CommonPasswordValidator',\n    },\n    {\n        'NAME': 'django.contrib.auth.password_validation.' +\n        'NumericPasswordValidator',\n    },\n]\n\n\n# Internationalization\n\nLANGUAGE_CODE = config('LANGUAGE_CODE', default='en-us')\n\nTIME_ZONE = config('TIME_ZONE', default='UTC')\n\nUSE_I18N = True\n\nUSE_L10N = True\n\nUSE_TZ = True\n\n\n# Static files (CSS, JavaScript, Images)\n\nSTATIC_URL = config('STATIC_URL', default='/static/')\n\nSTATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')\n\nSTATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'\n\n\n# rest framework\n\nREST_FRAMEWORK = {\n    'DEFAULT_AUTHENTICATION_CLASSES': [\n        'rest_framework.authentication.TokenAuthentication',\n    ],\n    'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.' +\n    'LimitOffsetPagination',\n    'PAGE_SIZE': 20,\n    'DEFAULT_FILTER_BACKENDS': [\n        'django_filters.rest_framework.DjangoFilterBackend',\n    ],\n    'DEFAULT_METADATA_CLASS': 'bothub.api.metadata.Metadata',\n}\n\n\n# cors headers\n\nCORS_ORIGIN_ALLOW_ALL = True\n\n\n# mail\n\nenvvar_EMAIL_HOST = config(\n    'EMAIL_HOST',\n    default=None,\n    cast=cast_empty_str_to_none)\n\nADMINS = config(\n    'ADMINS',\n    default='',\n    cast=lambda v: [\n        (\n            s.strip().split('|')[0],\n            s.strip().split('|')[1],\n        ) for s in v.split(',')] if v else [])\nEMAIL_SUBJECT_PREFIX = '[bothub] '\nDEFAULT_FROM_EMAIL = config(\n    'DEFAULT_FROM_EMAIL',\n    default='webmaster@localhost')\nSERVER_EMAIL = config('SERVER_EMAIL', default='root@localhost')\n\nif envvar_EMAIL_HOST:\n    EMAIL_HOST = envvar_EMAIL_HOST\n    EMAIL_PORT = config('EMAIL_PORT', default=25, cast=int)\n    EMAIL_HOST_USER = config('EMAIL_HOST_USER', default='')\n    EMAIL_HOST_PASSWORD = config('EMAIL_HOST_PASSWORD', default='')\n    EMAIL_USE_SSL = config('EMAIL_USE_SSL', default=False, cast=bool)\n    EMAIL_USE_TLS = config('EMAIL_USE_TLS', default=False, cast=bool)\nelse:\n    EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'\n\nSEND_EMAILS = config('SEND_EMAILS', default=True, cast=bool)\n\n\n# webapp\n\nBOTHUB_WEBAPP_BASE_URL = config(\n    'BOTHUB_WEBAPP_BASE_URL',\n    default='http://localhost:8080/')\n\n\n# NLP\n\nBOTHUB_NLP_BASE_URL = config(\n    'BOTHUB_NLP_BASE_URL',\n    default='http://localhost:2657/')\n\n\n# CSRF\n\nCSRF_COOKIE_DOMAIN = config(\n    'CSRF_COOKIE_DOMAIN',\n    default=None,\n    cast=cast_empty_str_to_none)\n\nCSRF_COOKIE_SECURE = config(\n    'CSRF_COOKIE_SECURE',\n    default=False,\n    cast=bool)\n\n\n# Logging\n\nLOGGING = DEFAULT_LOGGING\nLOGGING['formatters']['bothub.health'] = {\n    'format': '[bothub.health] {message}',\n    'style': '{',\n}\nLOGGING['handlers']['bothub.health'] = {\n    'level': 'DEBUG',\n    'class': 'logging.StreamHandler',\n    'formatter': 'bothub.health',\n}\nLOGGING['loggers']['bothub.health.checks'] = {\n    'handlers': ['bothub.health'],\n    'level': 'DEBUG',\n}\n\n\n# Supported Languages\n\nSUPPORTED_LANGUAGES = config(\n    'SUPPORTED_LANGUAGES',\n    default='en|pt',\n    cast=cast_supported_languages)\n\n\n# SECURE PROXY SSL HEADER\n\nSECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')\n", "path": "bothub/settings.py"}]}