generateAbsoluteString for image makes problem on special server setup

Created on 13 March 2025, 22 days ago

Problem/Motivation

If you Drupal Site and Hoster does something "magical" with domains and basic auth, the background image of the Login-page is leading to the wrong domain.

Drupal Site is e.g hostet at origin.example.com This subdomain has no CDN and should not be accessible and has a basic auth.
With some server magic, if you access example.com, it shows content (reverse proxy contents from origin.example.com) and has also a cdn/caching and firewall etc on top.

Gin Login has a coded path of the background image in the module:
https://git.drupalcode.org/project/gin_login/-/blob/2.1.x/gin_login.modu...
generateAbsoluteString is making us problems, as it will provide the background image via origin.example.com. instead of example.com

Steps to reproduce

setup a crazy hosting solution, so this can be testable… not.

Proposed resolution

replace generateAbsoluteString with generateString so this would be not a problem.
At least it would fix the problem for our nice server setup, we have in use ;)

Remaining tasks

check if the thing would work.
we can provide a patch if needed.

User interface changes

none

API changes

none

Data model changes

none

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇦🇹Austria Grienauer Vienna

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024