Why is the Apple Touch Icon loaded via HTTP instead of HTTPS?

After forcing https, it seems to be working now, I get no errors but there seems to be an issue for the security certificate though.

I get this in Firefox only when accessing https://WWW.community.mysite.com:

The certificate is only valid for community.mysite.com. Error code: SSL_ERROR_BAD_CERT_DOMAIN

Note that the following work perfectly (ALL redirect to https://community.mysite.com, except https://www in FF):

Although https://WWW.community.mysite.com also redirects to https://community.mysite.com in Chrome and it works as expected, Firefox does not redirect and instead shows that error and blocks the site.

I configured my app.yml file using this guide: Set up Let’s Encrypt with multiple domains / redirects and added a redirect from www to the non-www version following this guide: Redirect additional domain(s) to your Discourse instance