- Issue created by @jigenshrestha
- πΊπΈUnited States lpeabody
I get an error that looks like this in my console:
Mixed Content: The page at 'https://drupal-site.traefik.site/node/23/layout' was loaded over HTTPS, but requested an insecure form action 'http://drupal-site.traefik.site/layout_builder_iframe_modal/redirect'. This request has been blocked; the content must be served over HTTPS.
Looks like it shouldn't be setting an absolute URL, or else risk protocol mismatch when folks are behind a reverse proxy that routes to http? Use a relative URL for the form action is perhaps a resolution?
- π¦πΉAustria InlΓ©
Same issue as @Ipeabody. Works like a charm on local, but on the actual server, we get a Mixed Content warning similar to #3 about the content needing to be served over https.
Given the OP had his issue fixed by changing the aggregation, should we open a new issue?
- πΊπΈUnited States dago.aceves
Howdy. If it works on local but not on remote servers, chances are you are running a reverse proxy on your remote and your Drupal is missing some additional configuration to make it happy.
Seems similar to this
https://www.drupal.org/project/layout_builder_iframe_modal/issues/3206990 β - πΊπΈUnited States lpeabody
@dago.aceves is correct. My local site was behind a Traefik reverse proxy. For my local site configuration I just had to set this to fix the issue:
$settings['reverse_proxy'] = TRUE; // Reverse proxy is handled by Docker Traefik container. Set the expected // addresses. $settings['reverse_proxy_addresses'] = [$_SERVER['REMOTE_ADDR']]; $settings['reverse_proxy_trusted_headers'] = Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_FORWARDED;
This is fine for a local setup.