Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for "Virtual host" used by Kubernetes Ingress #159

Open
pawelbolonek opened this issue Nov 3, 2020 · 3 comments
Open

Support for "Virtual host" used by Kubernetes Ingress #159

pawelbolonek opened this issue Nov 3, 2020 · 3 comments
Labels

Comments

@pawelbolonek
Copy link

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]);
}
})

@stale
Copy link

stale bot commented May 10, 2021

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

@stale stale bot added the wontfix label May 10, 2021
@mhermosi
Copy link

mhermosi commented Dec 5, 2022

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

@mhermosi
Copy link

mhermosi commented Dec 5, 2022

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants