Can I ask how have you installed SSL on your discourse? Is it a generic cloudflare certificate or something?
Edit:
Indeed it’s cloudflare https://www.whynopadlock.com/results/df748a55-67d9-4477-9502-c618b69cb38c
And I’m assuming you’re running their “Flexible” SSL mode. This explains a lot about why the calls are messed up.