Skip to content

Commit c19c0c2

Browse files
committed
Fixed python & feature test failures caused by Werkzeug 3.1.7 rejecting empty Host header in CSRF token generation.
1 parent 2576548 commit c19c0c2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

web/regression/python_test_utils/csrf_test_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ def generate_csrf_token(self, *args, **kwargs):
9494
# powers `flask.session`,
9595
# and make a test request context that has those cookies in it.
9696
environ_overrides = {
97-
'wsgi.url_scheme': ''
97+
'wsgi.url_scheme': 'http',
98+
'HTTP_HOST': 'localhost',
9899
}
99100
self._add_cookies_to_wsgi(environ_overrides)
100101

0 commit comments

Comments
 (0)