Https rewrite rule and lineage. Static resources being served as http is a lineage child folder of

So the mapping is like this: -->

The rewrite rule in nginx looks like this (pythonjam is the plone site):

rewrite ^/(.*)$ /VirtualHostBase/https/$http_host:443/pythonjam/conference-2017/VirtualHostRoot/$1 break;

For some reason the static resources are being served as http NOT https.
I'm trying to figure why.

After a bit of reflection I found a solution by using cloudflare (totally forgot I had that in front of everything). I had to go into the cloudflare "crypto" menu and ensure that "Automatic HTTPS Rewrites" was enabled.

I'm not sure if Cloudflare introduced the initial problem, but this works for me.
Also, I'm not 100% sure that this has anything to do with the fact that it is a lineage child site.

Could this be what's missing?