{% extends "base.html" %} {% block title %}{{ _("Proxy") }} · {{ bot.name }}{% endblock %} {% block crumbs %} {{ _("Bots") }} / {{ bot.name }} /

{{ _("Proxy") }}

{% endblock %} {% block content %}
{{ panel_icon('shield')|safe }}
{{ _("Why a proxy?") }}
{{ _("The bot's HF Space can stay") }} {{ _("private") }}. {{ _("External callers (Telegram webhooks, integrations, scripts) hit") }} /proxy/{{ bot.slug }}/… {{ _("on this panel, and we forward to the bot. Every request is logged to the audit table.") }}

{{ _("Public URL") }}

{{ _("What external services call.") }}
{{ _("Telegram webhook") }} {{ request.url.scheme }}://{{ request.url.netloc }}/proxy/{{ bot.slug }}/telegram/webhook
{{ _("Health endpoint") }} /proxy/{{ bot.slug }}/health
{{ _("Catch-all") }} /proxy/{{ bot.slug }}/<{{ _("any-path") }}>

{{ panel_icon('key')|safe }} {{ _("Authentication") }}

{{ _("Two ways to authenticate against the proxy:") }}

  • {{ _("Session cookie") }} — {{ _("for browser access. Admin or bot owner only.") }}
  • {{ _("Bearer token") }} — Authorization: Bearer <llm_proxy_token> {{ _("for machine-to-machine traffic.") }}

{{ _("Health probe") }}

{{ _("Round-trip through the proxy to the bot's runtime.") }}

{{ _("Click") }} {{ _("Probe") }} {{ _("to send a request through") }} /proxy/{{ bot.slug }}/health.

{{ _("Upstream (Render) — legacy") }}

{{ _("If your bot uses a separate Render proxy for LLM traffic, its status is shown here.") }}
{{ panel_icon('edit')|safe }} {{ _("Edit URL") }}
{% if not bot.render_url %}

{{ _("No Render proxy URL configured. The bot either calls LLMs directly or uses the host's own proxy above.") }}

{% else %}
{{ _("Status") }} {% if health.ok %} {{ _("Healthy") }} · {{ health.latency_ms }}ms · HTTP {{ health.status }} {% elif health.status %} HTTP {{ health.status }} {% else %} {{ _("Unreachable") }} {% endif %}
{{ _("URL") }}{{ bot.render_url }}
{{ _("Path probed") }}{{ health.path or '—' }}
{% if health.error %}
{{ _("Error") }}{{ health.error }}
{% endif %}
{% endif %}

{{ _("Recent proxy traffic") }}

{{ _("Last requests routed through") }} /proxy/{{ bot.slug }}/….
{{ _("Open audit log") }}
{{ _("When") }}{{ _("Method") }}{{ _("Path") }}{{ _("Status") }}{{ _("Latency") }}{{ _("User") }}
{{ _("Loading…") }}
{% endblock %} {% block scripts %} {% endblock %}