I had a similar problem: Insecure content from markdown-it-bundle when using https
You need to let discourse know you want the SSL version of the site by specifying https in your outer nginx config by adding:
proxy_set_header Host $http_host;
or
proxy_set_header Host https
Then just reload nginx and it should work correctly!
Hope this helps!