Configure nginx to properly handle $_SERVER['REMOTE_ADDR'] in codespaces

Created on 9 April 2025, 16 days ago

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

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇸🇮Slovenia useernamee Ljubljana

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

Comments & Activities

Production build 0.71.5 2024