View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001819 | Xdebug | Step Debugging | public | 2020-07-09 08:28 | 2022-12-14 11:24 |
| Reporter | JoniJnm | Assigned To | |||
| Priority | normal | Severity | feature | Reproducibility | unable to reproduce |
| Status | closed | Resolution | fixed | ||
| Target Version | 3.2dev | Fixed in Version | 3.2.0 | ||
| Summary | 0001819: 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. | ||||
| Tags | No tags attached. | ||||
| Operating System | |||||
| PHP Version | 7.4.0-7.4.4 | ||||
|
|
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. |
|
|
In my case, I need to check 2 headers. client_discovery_header only allows set one. |
|
|
Right, but after Xdebug can't find the client_discovery_header one, it will fall back REMOTE_ADDR. |
|
|
It falls back in HTTP_X_FORWARDED_FOR and then REMOTE_ADDR, but my prioritory & sequence is other. Specifically:
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:
|
|
|
|
|
|
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 |