mautic / docker-mautic

Docker Image for Mautic
https://www.mautic.org
362 stars 274 forks source link

Mixed Content HTTPS issue when using Traefik reverse proxy #212

Closed user592965 closed 2 years ago

user592965 commented 2 years ago

Hello, I use mautic v4.0.0-rc in docker behind a traefik v2 reverse proxy, Mautic itself run without https and traefik add ssl on its side. I set mautic url link as http://my-mautic-domain.com in local.php config to avoid the "too many redirect" error when in set httpS://my-mautic-domain.com and on the whole everything works fine, but there are some links that are problematic, for example when I go to the "Companies" tab and click on a company name, the link wants to open in http in chrome and I get this error in chrome's console:

Mixed Content: The page at 'https://my-mautic-domain.com/s/companies' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://my-mautic-domain.com/s/companies/view/7112?_=1632335192557&mauticUserLastActive=395&mauticLastNotificationId=1'. This request has been blocked; the content must be served over HTTPS.

Same when trying to go to the next page in Companies. But this does not happen for Contacts or other links.

user592965 commented 2 years ago

Problem solved by adding the reverse proxy IP in the trusted_proxies field and changing the url of mautic to https:// in local.php