From 45cd18af996f46aecb4f50ca693096727f114cab Mon Sep 17 00:00:00 2001 From: vvzvlad Date: Mon, 11 May 2026 02:54:39 +0300 Subject: [PATCH] feat(api): add landing page endpoint Introduce a root GET route that serves a minimal HTML landing page describing the Pyrogram Bridge service and linking to its GitHub repository. This provides a friendly entry point for users accessing the service via a browser. --- api_server.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/api_server.py b/api_server.py index 6e85c92..67d4d25 100644 --- a/api_server.py +++ b/api_server.py @@ -709,6 +709,40 @@ def is_local_request(request: Request) -> bool: return True return False + +@app.get("/", response_class=HTMLResponse) +async def index() -> HTMLResponse: + """Returns a simple landing page with service description and GitHub link.""" + html = """ + + + + + Pyrogram Bridge + + + +

Pyrogram Bridge

+

A Telegram-to-RSS/JSON bridge that exposes Telegram channel posts as RSS feeds and JSON API endpoints.

+

github.com/vvzvlad/pyrogram-bridge

+ +""" + return HTMLResponse(content=html) + + @app.get("/html/{channel}/{post_id}", response_class=HTMLResponse) @app.get("/post/html/{channel}/{post_id}", response_class=HTMLResponse) @app.get("/html/{channel}/{post_id}/{token}", response_class=HTMLResponse)