Skip to content

Commit 0073eeb

Browse files
committed
Fixed coderabbitai review comments
1 parent eadbe67 commit 0073eeb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/regression/python_test_utils/csrf_test_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,10 @@ def generate_csrf_token(self, *args, **kwargs):
9393
# this test client, such as the secure cookie that
9494
# powers `flask.session`,
9595
# and make a test request context that has those cookies in it.
96+
server_name = self.app.config.get("SERVER_NAME") or "localhost"
9697
environ_overrides = {
9798
'wsgi.url_scheme': 'http',
98-
'HTTP_HOST': current_app.config["SERVER_NAME"] or "localhost"
99+
'HTTP_HOST': server_name
99100
}
100101
self._add_cookies_to_wsgi(environ_overrides)
101102

0 commit comments

Comments
 (0)