def METHOD_NAME() -> ResponseReturnValue | None:  # type: ignore[misc]
    header_value = request.headers.get(header_key)
    # If redirection header match and protocol match, then no need for a redirection.
    if header_value is not None and header_value != header_expected_value:
        if request.url.startswith("http://"):
            return quart_redirect(request.url.replace("http://", "https://", 1), code=301)
    return None