mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-17 16:34:44 -05:00
Fixed Python & feature test failures caused by Werkzeug 3.1.7 rejecting empty Host header in CSRF token generation.
This commit is contained in:
@@ -93,8 +93,10 @@ class TestClient(testing.FlaskClient):
|
||||
# this test client, such as the secure cookie that
|
||||
# powers `flask.session`,
|
||||
# and make a test request context that has those cookies in it.
|
||||
server_name = self.app.config.get("SERVER_NAME") or "localhost"
|
||||
environ_overrides = {
|
||||
'wsgi.url_scheme': ''
|
||||
'wsgi.url_scheme': 'http',
|
||||
'HTTP_HOST': server_name
|
||||
}
|
||||
self._add_cookies_to_wsgi(environ_overrides)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user