Mobile app version of vmapp.org
Login or Join
Shanna517

: HTTP request to an API has been blocked from an HTTPS website I am facing problem to call web service which is hosted over HTTP and I am calling web service from HTTPS domain. web service's

@Shanna517

Posted in: #Htaccess #Http #Https #WebServices

I am facing problem to call web service which is hosted over HTTP and I am calling web service from HTTPS domain.

web service's .htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ %{ENV:BASE}index.php [QSA,L]


I got following error in console when I am trying to calling web.


angular.min.js:93 Mixed Content: The page at www.<my-domain.com>/#/ was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint <api url goes here>. This request has been blocked; the content must be served over HTTPS.


Note

Web service is hosted in AWS server which is HTTP only and my website is hosted to other hosting provider.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Shanna517

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shanna517

As a work around, I am proxying the web service:


My SSL Hosting (Angular Project + Newly created proxy web service)
AWS (Old Web service + MySql Database)


From angularJS i call newly created proxy (that just uses cURL). This cURL code passes request to AWS server over HTTP.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme