Problem/Motivation

We had to register the server itself as reverse proxy in lupus-decoupled-project in order for it to properly work on codespaces. Without this the "View API Output" was redirecting the user to http://localhost:80 instead of the proper codespaces BE url.

Proposed resolution

Configure nginx to properly handle $_SERVER['REMOTE_ADDR'] so that we can remove

$settings['reverse_proxy'] = TRUE; 
$settings['reverse_proxy_addresses'] = [$_SERVER['REMOTE_ADDR']];
$settings['reverse_proxy_header'] = Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PROTO; 

from settings.php

Comments

useernamee created an issue. See original summary.

useernamee’s picture

Issue summary: View changes
Parent issue: » #3505721: Replace Gitpod demos
fago’s picture

Title: Configure nginx to properly handle $_SERVER['REMOTE_ADDR'] in codespaces » Configure nginx to properly handle $_SERVER['REMOTE_ADDR'] in project-setup
Priority: Normal » Major