1

In our cloud-application we allow direct printing to a local, network enabled Zebra Printer via a local http-proxy.

For the local HTTP Proxy we use a Raspberry Pi (running Apache + PHP) which takes the Web Request (POST form data), and forwards it onto the printer via Telnet on port 9100.

This does work - the labels print.

The issue, however is that our cloud application is always run via HTTPS (https://app.domain.com/), the Raspberry Pi is HTTP (http://192.168.1.100/) - so every time the user tries to post the form to the Raspberry Pi the browser warns the form is insecure.

I've tried implementing this via Ajax, however an insecure ajax request is blocked outright so it totally stops things working.

I also tried via JSONP, however I found that JSONP does not support POST.

Are there any other method for making this work?

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
user984976
  • 1,314
  • 1
  • 12
  • 21
  • Have you tried using the `crossDomain: true` option of jQuery.ajax? I think your scenario requires that. See [this](http://stackoverflow.com/a/20423411/849365) answer to a linked question for the example. – Prahlad Yeri Dec 07 '15 at 08:40
  • @PrahladYeri Thanks for your reply. I've tried this however the 'insecure XMLHttpRequest' issue still seems to be blocking the request from going out. – user984976 Dec 07 '15 at 22:51
  • @user984976 did you manage to solve this? – Nitin May 12 '17 at 13:25
  • No, people would just have to press the button saying they allow posting a non-secure form. – user984976 May 13 '17 at 00:29

0 Answers0