We recently updated our Drupal website to use wodby/nginx:1.25-5.33.0 instead of wodby/nginx:1.19-5.25.6. Immediately we noticed that sitemap.xml was generated with links using http instead of https.
Investigation
The Simple Sitemap module is using $GLOBALS['base_url'] to generate links, which in turn relies on symfony/http-foundation method Request::isSecure. This method checks X-Forwarded-Proto header for http or https.
Proposed solution
Provide environmental variable to set the value for this header and override the default.
Motivation
We recently updated our Drupal website to use
wodby/nginx:1.25-5.33.0
instead ofwodby/nginx:1.19-5.25.6
. Immediately we noticed thatsitemap.xml
was generated with links usinghttp
instead ofhttps
.Investigation
The Simple Sitemap module is using
$GLOBALS['base_url']
to generate links, which in turn relies onsymfony/http-foundation
method Request::isSecure. This method checksX-Forwarded-Proto
header forhttp
orhttps
.Proposed solution
Provide environmental variable to set the value for this header and override the default.