View Issue Details

IDProjectCategoryView StatusLast Update
0002154XdebugDocumentationpublic2023-11-29 14:13
ReporterNavarr Assigned Toderick  
Status closedResolutionfixed 
Product Version3.2.0 
Summary0002154: Undocumented change in behavior for xdebug.client_discovery_header

In Xdebug 3.2, xdebug.client_discovery_header was updated to accept a list of headers to check and fallback to Forwarded For and Remote Address was removed.

However, the documentation continues to say:

If xdebug.client_discovery_header is configured to be a non-empty string, then the value is used as key in the $_SERVER superglobal array to determine which header to use to find the IP address or hostname to use for 'connecting back to'. This setting is only used in combination with xdebug.discover_client_host and is otherwise ignored.

For example, if xdebug.client_discovery_header is set to HTTP_FORWARD_HOST, then Xdebug will check $_SERVER['HTTP_FORWARD_HOST'] before the $_SERVER['HTTP_X_FORWARDED_FOR'] and $_SERVER['REMOTE_ADDR'] variables.

This second paragraph should likely be updated to:

For example, if xdebug.client_discovery_header is set to "HTTP_FORWARD_HOST,HTTP_X_FORWARDED_FOR,REMOTE_ADDR", then Xdebug will attempt to connect to the first host it finds when searching (in order) $_SERVER['HTTP_FORWARD_HOST'], $_SERVER['HTTP_X_FORWARDED_FOR'] and $_SERVER['REMOTE_ADDR'].

Issue that requested change:
PR for change:

TagsNo tags attached.
Operating System
PHP Version8.1.10-8.1.19



2023-01-19 17:25

administrator   ~0006502

I have fixed this in the documentation now:

Thanks for your report!


2023-11-29 14:12

reporter   ~0006684

Hi, I suspect the documentation is still not clear on this matter.

I think we should update also the documentation of
because of the section that says:

If xdebug.client_discovery_header is configured, then the $_SERVER variable with that configured name will be checked before HTTP_X_FORWARDED_FOR and REMOTE_ADDR.

It might lead to thinking xdebug.client_discovery_header always fallback to HTTP_X_FORWARDED_FOR and REMOTE_ADDR but it's not the case

I opened an MR

Issue History

Date Modified Username Field Change
2023-01-11 15:21 Navarr New Issue
2023-01-19 17:25 derick Assigned To => derick
2023-01-19 17:25 derick Status new => closed
2023-01-19 17:25 derick Resolution open => fixed
2023-01-19 17:25 derick Note Added: 0006502
2023-11-29 14:12 loru88 Note Added: 0006684