Skip to content

Commit be4089a

Browse files
committed
fix(warmup): set correct subdomain on request
1 parent f26d56f commit be4089a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/sentry/wsgi.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@
2020
# Run WSGI handler for the application
2121
application = WSGIHandler()
2222

23+
24+
warmup_host_name = settings.ALLOWED_HOSTS[0] if settings.ALLOWED_HOSTS[0] != "*" else "127.0.0.1"
25+
2326
# trigger a warmup of the application
2427
application(
2528
{
2629
"PATH_INFO": reverse("sentry-warmup"),
2730
"REQUEST_METHOD": "GET",
28-
"SERVER_NAME": "127.0.0.1",
31+
"SERVER_NAME": warmup_host_name,
2932
"SERVER_PORT": "9001",
3033
"wsgi.input": io.BytesIO(),
3134
"wsgi.url_scheme": "https",

0 commit comments

Comments
 (0)