Skip to content

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

@elaman

Description

@elaman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions