mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-11-23 12:36:51 +01:00
allow insecure connections (Cherry pick)
This commit is contained in:
parent
b942c2a58b
commit
d3a038f35d
@ -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
|
||||
|
||||
|
||||
|
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user