(connection, request)
| 527 | """Client follows redirect to a secure URI on a different origin.""" |
| 528 | |
| 529 | def redirect(connection, request): |
| 530 | response = connection.respond(http.HTTPStatus.FOUND, "") |
| 531 | response.headers["Location"] = get_uri(other_server) |
| 532 | return response |
| 533 | |
| 534 | async with serve(*args, ssl=SERVER_CONTEXT, process_request=redirect) as server: |
| 535 | async with serve(*args, ssl=SERVER_CONTEXT) as other_server: |