- ๐ฎ๐ณIndia prem suthar Ahemdabad- Gujrat , Jodhpur - Rajsthan
Prem Suthar โ made their first commit to this issueโs fork.
- Merge request !6694drupal-2998728/2998728-reverse-proxy-settings - Reroll The Patch As per issue tag. โ (Open) created by prem suthar
- Status changed to Needs review
about 1 year ago 8:23am 20 February 2024 - ๐ฎ๐ณIndia prem suthar Ahemdabad- Gujrat , Jodhpur - Rajsthan
Added the Mr For the #13 for re-roll the patch .
- Status changed to Needs work
about 1 year ago 10:27am 22 February 2024 The Needs Review Queue Bot โ tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide โ to find step-by-step guides for working with issues.
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
I ran into this as well for https://wimleers.com after upgrading from Drupal 7 to 10. It made me pull my hair out for hours. Although I'm on a very atypical setup: local server at home, via non-standard port (ISP blocks port HTTP(S) ports) as HTTP, served by a CDN as HTTPS. At first, I just thought I was doing something wrong in my exotic (but dead simple!) setup, but it turns out to have been this long-standing Drupal core bug ๐
Even though it's a single site! Because many years ago, it was considered a best practice to not use
sites/default/files
, butsites/example.com/files
. Because I don't usesites/default
, the same code path is triggered as for a multisite.I didn't really need trusted proxies; I only needed the reverse proxy (Fastly) to be trusted, to ensure that the TLS termination at the Fastly edge was respected.
While I first hacked core (๐), I then settled on something simpler: running this early enough, aka before Drupal's
index.php
is executed:// When any non-local IP acccesses this, serve this as if it's the live site. // (It should be a Fastly IP address, and it is possible to validate against that, but this suffices.) // @see https://www.fastly.com/documentation/reference/api/utils/public-ip-list/ if (filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) { $_SERVER['HTTP_HOST'] = 'wimleers.com'; // Fastly also does TLS termination for us, so make Drupal think it's accessed via https://. // @see https://docs.fastly.com/en/guides/tls-termination#when-using-wordpress $_SERVER['HTTPS'] = 'on'; }
(Because doing it in
settings.php
is too late.)