Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check that invalid header error emails are suppressed #187

Closed
alexlittle opened this issue Apr 26, 2015 · 1 comment
Closed

Check that invalid header error emails are suppressed #187

alexlittle opened this issue Apr 26, 2015 · 1 comment

Comments

@alexlittle
Copy link
Member

As we have on oppiamobile server

@alexlittle
Copy link
Member Author

Suppressed the emails using null logging handler:

LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
},
'null': {
'level': 'DEBUG',
'class': 'logging.NullHandler',
},
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
'django.security.DisallowedHost': {
'handlers': ['null'],
'propagate': False,
},
}
}

@alexlittle alexlittle changed the title Check that invalid header error emails are supressed Check that invalid header error emails are suppressed Jun 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant