0

in the pass. I have web app runs http:// can call another local app to http://localhost:8888 that works fine.

now I just move web app to SSL https:// .But it cannot call http://localhost:8888 any more.

 Mixed Content: The page at  was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint . This request has been blocked; the content must be served over HTTPS send

how to solve this problem on google Chrome? The local host app using c#.

riseres
  • 2,896
  • 3
  • 24
  • 38
  • 1
    Read up on the Same Origin Policy. It is possible to use CORS to allow this request, but you're probably better off just moving 8888 to HTTPS if you can. – Octopoid Jan 20 '15 at 19:07
  • sounds like you have some port sharing / usage issue have you googled how to set up `SSL`[MSDN Configuring HTTP and HTTPS](http://msdn.microsoft.com/en-us/library/ms733768%28v=vs.110%29.aspx) – MethodMan Jan 20 '15 at 19:08
  • for move localhost app to HTTPS. I have googled http://stackoverflow.com/questions/11403333/httplistener-with-https-support but it seems there is impossible to my customers (100+ clients ) to do this. Is there any way to write c# app embedded certificate SSL for user just install and you it (without users do command line) ? – riseres Jan 20 '15 at 19:14
  • I'm afraid I'm not really following you. How are 100+ clients using localhost in the first place?? Unless you mean users, which of course makes little difference to the server configuration. – Octopoid Jan 20 '15 at 19:16
  • they downloaded the app and install no need to config anything. it is the printer service that print directly data from the web. – riseres Jan 20 '15 at 19:17
  • I'm still not entirely sure what is running where in this, but if you can't update the clients to be running 8888 over HTTPS, you'll have to allow the request via CORS, or redesign the system. – Octopoid Jan 20 '15 at 19:19
  • ok i will try CORS then i will update – riseres Jan 20 '15 at 19:22
  • it is already CORS i see Options request. in the old one HTTP to HTTP. but the SSL i cannot see the Options request . – riseres Jan 20 '15 at 20:09
  • I tried this " var invocation = new XMLHttpRequest(); var url = 'http://localhost:8888'; function callOtherDomain() { if(invocation) { invocation.open('GET', url, true); invocation.onreadystatechange = function(){}; invocation.send(); } }" – riseres Jan 20 '15 at 20:12
  • here is the result no HTTP request. " Mixed Content: The page at '...' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://localhost:8888/'. This request has been blocked; the content must be served over HTTPS.VM1157:9 callOtherDomainVM1170:2 (anonymous function)VM799:762 InjectedScript._evaluateOnVM799:695 InjectedScript._evaluateAndWrapVM799:609 InjectedScript.evaluate " – riseres Jan 20 '15 at 20:12

0 Answers0