Method
get_server_name
(self, connection: ServerConnection, request: Request)
Source from the content-addressed store, hash-verified
| 174 | rule.websocket = True |
| 175 | |
| 176 | def get_server_name(self, connection: ServerConnection, request: Request) -> str: |
| 177 | if self.server_name is None: |
| 178 | return request.headers["Host"] |
| 179 | else: |
| 180 | return self.server_name |
| 181 | |
| 182 | def redirect(self, connection: ServerConnection, url: str) -> Response: |
| 183 | response = connection.respond(http.HTTPStatus.FOUND, f"Found at {url}") |
Tested by
no test coverage detected