await bot.set_webhook(
certificate='/etc/nginx/cert.pem',
url=url,
# ip_address="194.110.55.245",
drop_pending_updates=True,
allowed_updates=dp.resolve_used_update_types()
)
app = web.Application()
SimpleRequestHandler(dispatcher=dp, bot=bot).register(app, path='/webhook')
setup_application(app, dp)
runner = web.AppRunner(app)
await runner.setup()
# ssl_context = ssl.create_default_context()
# site = web.TCPSite(runner, host="127.0.0.1", port=9000)
# site = web.TCPSite(runner, host="0.0.0.0", port=9000)
site = web.TCPSite(runner, host="0.0.0.0", port=8443)
Как правильно подключать webhook? Выскакивает такая ошибка aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered'"
2022-08-02 13:59:58.335 | INFO | aiohttp.web_log:log:206 - 91.108.6.52 [02/Aug/2022:13:59:58 +0000] "UNKNOWN / HTTP/1.0" 400 205 "-" "-"
шо за дермище
Обсуждают сегодня