R
R
RealFireStorm2019-03-25 12:14:37
API
RealFireStorm, 2019-03-25 12:14:37

How to make the API work over HTTPS?

Good afternoon friends. I have a Flask site. There is a thermostat with internet connection. The thermostat sends data (temperature, etc.) to this site with a post-request. The user can view this data. When the site is running over HTTP everything works fine. When HTTPS, then predictably the request from the device does not pass. How to bypass it? The thermostat does not teach SSL.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Shpak, 2019-03-25
@shpaker

Split the project into two services? Leave one for the thermostat with HTTP, and give the second a web face via HTTPS?

I
Ivan Shumov, 2019-03-25
@inoise

Well, there are several options. The simplest is to move the endpoint for the controller to a separate http route (separate it at the web server level) and either duplicate the logic there, or transfer it, or transfer it to https synchronously.
You can also just disable the https route at the web server level. Well, or even set up a proxy ... I can now throw in a dozen options

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question