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qwu9OjfoytYRiIjlEjlNUZZX+6B6u2LQiXwP3ov1tmZO1fPVtCoP3NanRc+b2d
EYkvPEgJAjjKqdm5f3uOyEkmQut/15McK8XGo6w8p0WBj1bGoy1LKS6u4Ymu4lNq
kLEQb8eYrxThA6/tKjew/W61/K93/TVIrxOh0+NZVftEP8SFmIafApxuiLayrqbU
i+QaMtZ+MvSnNVc94B07XB9H9oDBGj05TV4UVAjTFNG5iELmtZJrSt8M97xmf1FY
8wIDAQAB
-----END PUBLIC KEY-----
"""

SERVER_URL_PROD = "https://cloud.remotivelabs.com"
SERVER_URL_DEV = "https://cloud-dev.remotivelabs.com"


def public_key(server_url: str = SERVER_URL_PROD) -> str:
    if server_url == SERVER_URL_PROD:
        return PROD_KEY
    if server_url == SERVER_URL_DEV:
        return DEV_KEY
    if "localhost" in server_url or "host.docker.internal" in server_url:
        return LOCALHOST_KEY
    return PROD_KEY
