smee-client
smee-client copied to clipboard
Support for "Virtual host" used by Kubernetes Ingress
Currently client pases original "Host" header coming from request. This way kubernetes ingress can't dispatch call to respective service.
Host header should come from target hostname and original Host could be placed in x-forwarded-host header as proxy usually do.
Suggested solution:
L50: Object.keys(data).forEach(key => { req.set(key, data[key]) if(key.toUpperCase() === 'HOST'){ req.set(key, target.host); req.set('x-forwarded-host', data[key]); } })
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
Is there an alternative to smee that support this then? if smee won't fix this? I have the same issue. and I think if you have a VM running http server with virtual hosts the proxy won't work as expected... smee should provide this or a way to override the HOST header sent to the target host
Currently client pases original "Host" header coming from request. This way kubernetes ingress can't dispatch call to respective service.
Host header should come from target hostname and original Host could be placed in x-forwarded-host header as proxy usually do.
Suggested solution:
L50: Object.keys(data).forEach(key => { req.set(key, data[key]) if(key.toUpperCase() === 'HOST'){ req.set(key, target.host); req.set('x-forwarded-host', data[key]); } })
I have tried this on my computer and works! Why not put the change and make a PR to see if it is accepted.... it is annoying having to have a customized version of smee!