Disable Sentry404CatchMiddleware report for blank referrer or logged out user

Greetings,

I’m using django and I’m looking for a way to continue logging 404 errors with “Sentry404CatchMiddleware” but disable the error report for users that are not logged in or for requests with blank referrer.

Any suggestions?

Thank you.