From e4179ea65f0a2ef92bcab17152e065d3985460c7 Mon Sep 17 00:00:00 2001 From: Ananth Bhaskararaman Date: Tue, 30 Aug 2022 17:27:43 +0530 Subject: [PATCH] Add SSL cert --- .../webhooks/webhook_starlette_echo_bot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/asynchronous_telebot/webhooks/webhook_starlette_echo_bot.py b/examples/asynchronous_telebot/webhooks/webhook_starlette_echo_bot.py index dadaa90..bcb440c 100644 --- a/examples/asynchronous_telebot/webhooks/webhook_starlette_echo_bot.py +++ b/examples/asynchronous_telebot/webhooks/webhook_starlette_echo_bot.py @@ -19,6 +19,8 @@ API_TOKEN = "TOKEN" WEBHOOK_HOST = "" WEBHOOK_PORT = 8443 # 443, 80, 88 or 8443 (port need to be 'open') WEBHOOK_LISTEN = "0.0.0.0" +WEBHOOK_SSL_CERT = "./webhook_cert.pem" # Path to the ssl certificate +WEBHOOK_SSL_PRIV = "./webhook_pkey.pem" # Path to the ssl private key WEBHOOK_URL = f"https://{WEBHOOK_HOST}:{WEBHOOK_PORT}/telegram" WEBHOOK_SECRET_TOKEN = "SECRET_TOKEN" @@ -82,4 +84,6 @@ uvicorn.run( app, host=WEBHOOK_HOST, port=WEBHOOK_LISTEN, + ssl_certfile=WEBHOOK_SSL_CERT, + ssl_keyfile=WEBHOOK_SSL_PRIV, )