Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Ignore DisallowedHosts logs from Sentry (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarayourfriend authored Aug 2, 2022
1 parent 596d627 commit 35fa6eb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions api/catalog/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import sentry_sdk
from decouple import config
from sentry_sdk.integrations.django import DjangoIntegration
from sentry_sdk.integrations.logging import ignore_logger

from catalog.configuration.aws import AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
from catalog.configuration.elasticsearch import ES, MEDIA_INDEX_MAPPING
Expand Down Expand Up @@ -350,3 +351,9 @@
send_default_pii=False,
environment=ENVIRONMENT,
)

# ALLOW_HOSTS is correctly configured so ignore this to prevent
# spammy bots like https://github.com/robertdavidgraham/masscan
# from pushing un-actionable alerts to Sentry like
# https://sentry.io/share/issue/9af3cdf8ef74420aa7bbb6697760a82c/
ignore_logger("django.security.DisallowedHost")

0 comments on commit 35fa6eb

Please sign in to comment.