Oniel
(Sergei Dmitriev)
7월 21, 2026, 2:01오후
1
Discourse Chat Integration 플러그인의 Telegram 제공자는 현재 모든 요청을 https://api.telegram.org으로 직접 전송합니다.
일부 국가 및 호스팅 환경에서는 네트워크 수준에서 Telegram이 차단되거나 사용할 수 없습니다. 이로 인해 웹훅 초기 설정을 포함하여 통합 기능이 작동하지 않습니다.
관리자가 Telegram Bot API 기본 URL을 신뢰할 수 있는 HTTPS 프록시 주소로 대체할 수 있는 사이트 설정을 추가하는 것을 제안합니다. 예를 들어, 기존 Telegram 통합은 변경하지 않은 채 Cloudflare Worker를 통해 요청을 라우팅할 수 있습니다.
기본값은 https://api.telegram.org으로 유지되므로 기존 설치에는 영향을 주지 않습니다.
제안 PR:
main ← 0niel:feature/telegram-api-base-url
merged 03:27PM - 22 Jul 26 UTC
## What changed
Adds `chat_integration_telegram_api_base_url` setting for the… Telegram chat integration (discourse-chat-integration plugin)
The setting defaults to `https://api.telegram.org`, so existing installations keep their current behavior.
## Why
Some Discourse installations cannot reach `api.telegram.org` directly because Telegram is blocked or restricted by local network providers.
This setting allows administrators to route Telegram Bot API requests through a trusted reverse proxy, such as a Cloudflare Worker, without patching the plugin.
## Cloudflare Worker example
The following Worker can be deployed as a small Telegram Bot API proxy:
```js
export default {
async fetch(request) {
const url = new URL(request.url);
if (
!url.pathname.startsWith("/bot") &&
!url.pathname.startsWith("/file/bot")
) {
return new Response("Not found", { status: 404 });
}
url.hostname = "api.telegram.org";
url.protocol = "https:";
url.port = "";
return fetch(new Request(url, request));
},
};
```
The proxy must be trusted because Telegram bot tokens are included in Bot API request paths.
4개의 좋아요
고맙습니다 @Oniel 포스트를 "정리"하고 PR을 병합했습니다.
3개의 좋아요