wodby / nginx

Nginx docker container image
https://wodby.com/stacks
MIT License
71 stars 52 forks source link

X-Forwarded-Proto is returning `http,https` instead of `https` since nginx version >= `1.23` #87

Open elaman opened 12 months ago

elaman commented 12 months ago

Motivation

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.

csandanov commented 11 months ago

Sure, let's add it