GET request throws error after app implemented SSL: Mixed Content: This request has been blocked; the content must be served over HTTPS" GET request throws error after app implemented SSL: Mixed Content: This request has been blocked; the content must be served over HTTPS" flask flask

GET request throws error after app implemented SSL: Mixed Content: This request has been blocked; the content must be served over HTTPS"


It was a weird case that came down to removing a forward slash from the end of a URL fixing everything. Somehow, whenever we made a GET request using $http in Angular like baseurl + inventory.id + "/", it would make a http request but as soon as remove that slash, it would make the https request correctly.

Still so confused


I think the root of the problem is in server redirects. I was able to resolve same issue with SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') setting for Django (its running behind AWS balancer). Here is documentation.