Still having trouble with domain mapping https

I have a multi-site wordpress install running on an ngnix vps.

I used to have varnish running but have since turned it off for debugging.

I am forcing ngnix to send the proto server variable, i am seein the is_ssl() function is working, however for some reason anytime php forces the https (ie marketplace plugn for stripe checkout) or if I manually code in ngnix to force https for certain links, I am getting a redirect loop.

Bangin my head against a wall for a couple days, pretty sure i have narrowed down the issue to the domain mapping plugin, because for blog 1 which doesn't use domain mapping, I have no issue.

I have also noticed that if i try to go to https://www.mappeddomain.com it will automattically switch it to http. I am thinking this functionality could possibly be creating the re-direct loop.

Love to know if you have some thoughts, thanks!