Skip to content

Commit 73bce0d

Browse files
authored
feat(asgi): Add sentry.is_localhost for inbound filters
1 parent eedf1ff commit 73bce0d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎sentry_sdk/integrations/wsgi.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ def __call__(
131131
SPANDATA.SENTRY_IS_LOCALHOST,
132132
_is_localhost(
133133
client_ip=get_client_ip(environ),
134-
url_host=environ.get("SERVER_NAME"),
134+
url_host=environ.get("SERVER_NAME")
135+
if not environ.get("HTTP_HOST")
136+
else None,
135137
host_header=environ.get("HTTP_HOST"),
136138
forwarded_host_header=environ.get("HTTP_X_FORWARDED_HOST"),
137139
),

0 commit comments

Comments
 (0)