voidlabs / mosaico

Mosaico - Responsive Email Template Editor
https://mosaico.io
GNU General Public License v3.0
1.71k stars 501 forks source link

fix(backend): Possibility to use `SERVER_URL` to overwrite upload url (e.g. proxy http -> https) #709

Open Ninos opened 4 months ago

Ninos commented 4 months ago

With SERVER_URL as environment variable it's possible now to change the image urls to "hardcoded" url. If not available, old method is used.

Currently this is important, if you're using a proxy between, because otherwise req.protocol is always http -> public image urls has http-scheme instead of https.