openvsx
openvsx copied to clipboard
fix: X-Forwarded-Host header can be array or comma separated list
Headers can be array values or be a single string with comma separated value
So when computing the host using X-Forwarded-Host it should use the first value and not the 'joined' list concatenate by a comma else it leads to invalid base URL
example:
https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#x-headers
Be careful when using these headers on the origin server, since they will contain more than one (comma-separated) value if the original request already contained one of these headers. For example, you can use %{X-Forwarded-For}i in the log format string of the origin server to log the original clients IP address, but you may get more than one address if the request passes through several proxies.
Fixes https://github.com/eclipse/openvsx/issues/498
Change-Id: I4407776a5296809e304e3c8b10dafe50e9929035 Signed-off-by: Florent Benoit [email protected]
@amvanbaren if you can review my PR Unit tests are provided
Hi, what is preventing this PR to be merged ?