I currently have a website running which sends a POST request using AJAX to an IP. It does however not work, as my site is served from HTTPS and the IP is, well..., HTTP. It is due to mixed content. How can I resolve this? I would not like to change my website to use HTTP instead of HTTPS.
Ajax request:
$.ajax({
type: 'POST',
url: 'http://' + MYIP,
});
There is a similar question, however, it does not fully answer this question as the answer "use HTTPS" is not possible for an IP (to my knowledge)
EDIT
I have an Arduino that listens to HTTP requests and concatenates them in plain text to form a readable string (E.g. POST /?remote=2 HTTP/
). If I am using HTTPS it will not work as the Arduino receives an encrypted post.
One solution is to rewrite the server to let it redirect the specific directory from HTTPS to HTTP, though I have no experience with NGINX rewriting.