async def METHOD_NAME(request: web.Request) -> web.Response:
    ipaddr_str = request.headers.get("x-host-ip")
    invalid_req_data = {
        "error": "bad-interface",
        "message": (
            f"The endpoint {request.rel_url}"
            f" can only be used from link-local connections."
            f" Make sure you're connected to this robot directly by cable"
            f" and using this robot's wired IP address"
            f" (not its wireless IP address)."
        ),
    }
    if not ipaddr_str:
        return web.json_response(  # type: ignore[no-untyped-call,no-any-return]
            data=invalid_req_data, status=403
        )
    try:
        addr = ipaddress.ip_address(ipaddr_str)
    except ValueError:
        LOG.exception(f"Couldn't parse host ip address {ipaddr_str}")
        raise
    if not addr.is_link_local:
        return web.json_response(  # type: ignore[no-untyped-call,no-any-return]
            data=invalid_req_data, status=403
        )
    return await handler(request)