Commit 910232e2 authored by Mathieu Courcelles's avatar Mathieu Courcelles

Fixes for Sentry

parent fc6c6019
Pipeline #34708687 passed with stage
in 3 minutes and 25 seconds
......@@ -103,7 +103,7 @@ MIDDLEWARE = [
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware',
#'debug_toolbar.middleware.DebugToolbarMiddleware',
# Uncomment the next line for simple clickjacking protection:
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
......@@ -147,8 +147,6 @@ INSTALLED_APPS = [
'debug_toolbar',
'defender',
'raven.contrib.django.raven_compat',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
......
......@@ -73,6 +73,10 @@ TIME_ZONE = 'America/Montreal'
PERCOLATOR_BIN = r'/usr/bin/percolator'
if os.getenv('SENTRY', None):
INSTALLED_APPS.append('raven.contrib.django.raven_compat')
MIDDLEWARE.insert(2, 'raven.contrib.django.raven_compat.middleware.'
'Sentry404CatchMiddleware')
RAVEN_CONFIG = {
'dsn': get_secret('SENTRY'),
# If you are using git, you can also automatically configure the
......@@ -81,9 +85,6 @@ if os.getenv('SENTRY', None):
'transport': RequestsHTTPTransport,
}
# 404 logging
MIDDLEWARE.insert(0, 'raven.contrib.django.raven_compat.middleware.Sentry404CatchMiddleware')
MIDDLEWARE.insert(0, 'x_forwarded_for.middleware.XForwardedForMiddleware')
CACHES = {
......
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