Infinite redirection when trying to request the site within docker

Created on 15 March 2023, over 1 year ago
Updated 28 May 2024, about 1 month ago

Problem/Motivation

When trying to do a request to a site within a container, and the site is enforcing https, there's a infinite redirection loop.
We found this issue when trying to integrate e2e testing with behat.
This issue might be specific to launchpad or might require some specific docker compose to reproduce it, but I suspect can be reproduced with any docker-compose setup. I'm assuming there's a container called "apache" where the front is accessible.

Steps to reproduce

Within docker, do a request to the site, following redirections:

curl -L --insecure --verbose https://apache/

Proposed resolution

On .htaccess, before redirecting to https, check HTTPS default apache variable, instead of checking the local ENV:HTTPS environment variable. We think this is save because the local ENV:HTTPS environment variable is checked before (on line 75) to set the environment variable protossl, so we don't need to check ENV:HTTPS again, checking ENV:protossl should be enough.

Remaining tasks

* Patch
* Review
* Test

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Fixed

Version

10.2

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain akalam

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024