Commit a6fa3086 authored by Mathieu Courcelles's avatar Mathieu Courcelles

Adds defender

parent d0bd58c7
Pipeline #14979973 passed with stage
in 2 minutes and 9 seconds
No preview for this file type
......@@ -97,7 +97,7 @@ STATICFILES_FINDERS = (
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'Base'
MIDDLEWARE_CLASSES = [
MIDDLEWARE = [
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
......@@ -152,6 +152,7 @@ INSTALLED_APPS = (
# CLMSVault app
'CLMSVault.CLMSVault_app',
'defender',
)
# A sample logging configuration. The only tangible logging
......@@ -219,4 +220,4 @@ CACHES = {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'unique-snowflake',
}
}
\ No newline at end of file
}
......@@ -68,13 +68,20 @@ if os.getenv('SENTRY', None):
}
# 404 logging
MIDDLEWARE_CLASSES.insert(0, 'raven.contrib.django.raven_compat.middleware.Sentry404CatchMiddleware')
MIDDLEWARE.insert(0, 'raven.contrib.django.raven_compat.middleware.Sentry404CatchMiddleware')
MIDDLEWARE_CLASSES.insert(0, 'x_forwarded_for.middleware.XForwardedForMiddleware')
MIDDLEWARE.insert(0, 'x_forwarded_for.middleware.XForwardedForMiddleware')
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
'LOCATION': '/var/tmp/django_cache',
}
}
\ No newline at end of file
}
# Django Defender
MIDDLEWARE.append('defender.middleware.FailedLoginMiddleware')
DEFENDER_LOGIN_FAILURE_LIMIT = 10
DEFENDER_BEHIND_REVERSE_PROXY = True
DEFENDER_REDIS_URL = 'redis://redis:6379/0'
\ No newline at end of file
biopython==1.69
Django==1.11.8
django-debug-toolbar==1.8
django-defender==0.5.1
django-grappelli==2.10.1
django-settings-export==1.2.1
django-xforwardedfor-middleware==2.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment