The "SERVER_NAME" environment variable seems to be set to an IP address in several environments (paste.httpserver, waitress.serve). But it seems request.domain is set in webob.Request, based on request.host, which preferences environ['HTTP_HOST'] over environ['SERVER_NAME'].
The "SERVER_NAME" environment variable seems to be set to an IP address in several environments (paste.httpserver, waitress.serve). But it seems request.domain is set in webob.Request, based on request.host, which preferences environ['HTTP_HOST'] over environ['SERVER_NAME'].