- 🇮🇹Italy marco.aresu Cagliari
Hi,
I created a patch to use relative url. The iframe url is generated with file_url_generator service.
The patch replace generateAbsoluteString method to generateString.In my case works Behind HTTPS Load Balancer.
- 🇺🇸United States glynster
Props to @marco.aresu the latest patch works a treat when using Varnish. We were encountering the same issue. Patch resolves the problem right away.
- 🇫🇷France erwangel
I tested patch from marco.aresu (#10) and it works but page attachments remain in http. For the moment I used
hook_page_attachments_alter
to correct this with astr_replace("http:", "https:", $url)
looping through
$attachments['#attached']['html_head_link'][1][0]['href']
I suppose the other patches don't correct this either. - 🇧🇪Belgium Fred R
Patch #10 works for me
My config : apache reverse proxy with docker
- 🇨🇳China ipumpkin
corrected reverse proxying config can fix this issue metioned in #8.
config steps:
1.add X-Forwarded-Proto header in reverse proxy server:
proxy_set_header X-Forwarded-Proto $scheme;
2. config reverse proxy in site settings.php
$settings['reverse_proxy'] = TRUE; $settings['reverse_proxy_addresses'] = ['172.17.27.0/24']; // reverse_proxy server ip list $settings['reverse_proxy_trusted_headers'] = \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_FOR | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_HOST | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PORT | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PROTO | \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED;