Image Upload not working: grapesbuilder called via http instead https

Your software
My Mautic version is: 5.0.2
My PHP version is: 8.1.27
My Database type and version is: MariaDB 10.x

Your problem
My problem is:
The Image upload is not working with the grapesbuilder.
It’s a complete new setup running debian 12 / php8.1-fpm and Mautic 5.0.2 (GIT).
The system is configured with SSL-Offloading behind a haproxy.
All is fine and running well except:
(exchange the real domain by mydomain)
Mixed Content: The page at ‘https://mydomain/s/emails/new’ was loaded over HTTPS, but requested an insecure resource ‘http://mydomain/s/grapesjsbuilder/upload’. This request has been blocked; the content must be served over HTTPS.

I checked the system settings and made sure that https is set for the System URL and the trusted proxy is also set.

These errors are showing in the log:

  • no errors in apache log

Steps I have tried to fix the problem:
→ checked the config :wink:

Same problem, similar config.

Mautic 5.0.3 running on Docker behind a NGINX Proxy with SSL enabled and valid certificate.

PS: site_url is set to https://…

My bad. Added Proxy IP to trusted_proxies and now it’s working.

Could you please elaborate on this solution?

Side note: This worked for me MAUTIC_TRUSTED_PROXIES conversion to JSON in Symfony error for Mautic 5 · Issue #13261 · mautic/mautic · GitHub

$parameters = [
    'trusted_proxies' => array(
      0 =>  '0.0.0.0/0'
    ),