diff --git a/README.md b/README.md index 8901c63..02f94cf 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Get information about a message #### Executable flag `relative` If enabled, allow only relative paths for files in local mode. -#### Executable flag `insecure` (not yet implemented) +#### Executable flag `insecure` Allow http connection in non-local mode diff --git a/telegram-bot-api/WebhookActor.cpp b/telegram-bot-api/WebhookActor.cpp index be8ef2e..a856b08 100644 --- a/telegram-bot-api/WebhookActor.cpp +++ b/telegram-bot-api/WebhookActor.cpp @@ -654,7 +654,7 @@ void WebhookActor::start_up() { pending_new_connection_flood_.add_limit(1, 1); if (!parameters_->local_mode_) { - if (url_.protocol_ == td::HttpUrl::Protocol::Https) { + if (url_.protocol_ == td::HttpUrl::Protocol::Https || (parameters_->allow_http_ && url_.protocol_ == td::HttpUrl::Protocol::Http)) { if (url_.port_ != 443 && url_.port_ != 88 && url_.port_ != 80 && url_.port_ != 8443) { VLOG(webhook) << "Can't create webhook: port " << url_.port_ << " is forbidden"; on_error(td::Status::Error("Webhook can be set up only on ports 80, 88, 443 or 8443"));