View Issue Details

IDProjectCategoryView StatusLast Update
0001819XdebugStep Debuggingpublic2022-12-14 11:24
ReporterJoniJnm Assigned To 
PrioritynormalSeverityfeatureReproducibilityunable to reproduce
Status closedResolutionfixed 
Target Version3.2devFixed in Version3.2.0 
Summary0001819: Allow a list of headers in 'xdebug.client_discovery_header'
Description

Hi,

Allow a list of headers in xdebug.remote_addr_header (separated by comma, f.e.) could be a good idea.

When xdebug.remote_connect_back is true, it checks HTTP_X_FORWARDED_FOR and if it's empty then REMOTE_ADDR.

I need something similar, a CUSTOM_HEADER if set and REMOTE_ADDR if set. But skipping HTTP_X_FORWARDED_FOR.

Thanks.

TagsNo tags attached.
Operating System
PHP Version7.4.0-7.4.4

Activities

derick

2021-03-17 08:50

administrator   ~0005726

Would the xdebug.client_discovery_header (https://xdebug.org/docs/step_debug#client_discovery_header) not work here?

Note: Setting names have changed in Xdebug 3.

JoniJnm

2021-03-17 13:52

reporter   ~0005786

In my case, I need to check 2 headers. client_discovery_header only allows set one.

derick

2021-03-17 15:24

administrator   ~0005793

Right, but after Xdebug can't find the client_discovery_header one, it will fall back REMOTE_ADDR.

JoniJnm

2021-03-17 16:57

reporter   ~0005795

It falls back in HTTP_X_FORWARDED_FOR and then REMOTE_ADDR, but my prioritory & sequence is other.

Specifically:

  • CUSTOM_HEADER_A
  • REMOTE_ADDR

So, in my case, i need to set a list of headers (i need to skip HTTP_X_FORWARDED_FOR).

It's the same as:

  • CUSTOM_HEADER_A
  • CUSTOM_HEADER_B

derick

2022-06-07 10:07

administrator   ~0006327

https://github.com/xdebug/xdebug/pull/841

JoniJnm

2022-12-14 11:24

reporter   ~0006485

If someone upgraded to xdebug 3.2 and was using client_discovery_header you have to change it to:

xdebug.client_discovery_header="YOUR_CURRENT_VALUE,HTTP_X_FORWARDED_FOR,REMOTE_ADDR"

if you want the same behavior