How to solve nginx reverse proxy mixed content(http, https)

Solution 1:

You have to go through the sites' code, and replace all occurences of http://domain.com/resource with either /resource or //domain.com/resource.

This ensures that all the dependent web page resources are loaded with the same protocol as the website itself is loaded.

Solution 2:

This worked for nginx https proxy >> nginx http serving Django backend

Inside a location directive:

proxy_set_header X-Forwarded-Proto $scheme;

For more details it's worth to read this excellent article: https://www.metaltoad.com/blog/running-drupal-secure-pages-behind-proxy

Solution 3:

With nginx, I needed:

        add_header 'Content-Security-Policy' 'upgrade-insecure-requests';