Skip to content
This repository was archived by the owner on Feb 1, 2022. It is now read-only.
This repository was archived by the owner on Feb 1, 2022. It is now read-only.

$_SERVER['REMOTE_HOST'] and REMOTE_ADDR incorrectly set #7

@gberche-orange

Description

@gberche-orange

As HTTP traffic for the apps on CloudFoundry are served by a chain[1], then the X-FORWARDED-HOST and X-FORWARDED-PROTO headers should be used to properly fill the $_SERVER variable for php apps.

Currently php apps most likely see the gorouter IP in REMOTE_X variables, and the DEA IP and port into SERVER_PORT and SERVER_ADDR

https://php-info.cfapps.io/info.php
_SERVER["REMOTE_ADDR"] 10.10.16.16
_SERVER["REMOTE_PORT"] 14456

[1] Current request chain is:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions