summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/waitress/adjustments.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/waitress/adjustments.py b/src/waitress/adjustments.py
index 42d2bc0..466b5c4 100644
--- a/src/waitress/adjustments.py
+++ b/src/waitress/adjustments.py
@@ -136,6 +136,7 @@ class Adjustments:
("unix_socket_perms", asoctal),
("sockets", as_socket_list),
("channel_request_lookahead", int),
+ ("server_name", str),
)
_param_map = dict(_params)
@@ -288,6 +289,11 @@ class Adjustments:
# is being processed.
channel_request_lookahead = 0
+ # This setting controls the SERVER_NAME of the WSGI environment, this is
+ # only ever used if the remote client sent a request without a Host header
+ # (or when using the Proxy settings, without forwarding a Host header)
+ server_name = "waitress.invalid"
+
def __init__(self, **kw):
if "listen" in kw and ("host" in kw or "port" in kw):