While the bot wrote I used the ngrok service, everything worked, now I decided to publish on our server (web server on IIS), set up IIS as a proxy so that I would redirect requests to localhost (set up by rewriting URL addresses), send requests via browser get (for checking ) everything works, i.e. I cause the external URL goes redirecting to my local. However, the bot did not work, I began to google I realized that I needed to use the NewWebhookWithCert () method, I generated a certificate and a private key using the command
openssl.exe req -new -x509 -nodes -newkey rsa: 1024 -keyout webhook_pkey.key -out webhook_cert.pem -days 3650
in code
bot.SetWebhook(tgbotapi.NewWebhookWithCert(net.WebhookURL, "webhook_cert.pem")) still
http.ListenAndServeTLS(":"+net.ListenPort, "webhook_cert.pem", "webhook_pkey.key", nil) and nothing, FIG know what else to do, please tell me