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

Ignore port when using UpstreamHost option #1505

Merged
merged 2 commits into from
Sep 29, 2023

Conversation

grssmnn
Copy link
Contributor

@grssmnn grssmnn commented Aug 19, 2021

Fixes

I wanted to use the UpstreamHost option and found out that Ocelot is handling the port as part of the hostname (when running on a different port than :80/:443). For my understanding this is not the expected behaviour since any other software like nginx or traefik ignore the port when talking about the hostname.

stefancruz pushed a commit to stefancruz/Ocelot that referenced this pull request Dec 22, 2022
@raman-m raman-m force-pushed the fix-upstream-host branch from c31bbcb to a4a1e8b Compare May 18, 2023 15:19
@raman-m
Copy link
Member

raman-m commented May 18, 2023

Hi Kevin!

What issue is this PR related to?

@raman-m
Copy link
Member

raman-m commented May 18, 2023

@grssmnn
https://ocelot.readthedocs.io/en/latest/features/routing.html#upstream-host
#209
The links above are the context.

I cannot get your proposal!.. You compare nginx & traefik but they are different networking tools than Ocelot.
If you want to ignore the port for Ocelot deploying scenario then just use fix from #209 via specifying pure domain name in Upstream Host property of the route.
If your Ocelot hosting scenario uses a port, just do not specify Upstream Host property.
If your Ocelot hosting scenario doesn't use a port, just specify the host value of registered domain name. If you have localhost scenario, just register extra domain via OS functionality and web server.
But I cannot imagine multiple Ocelot gateways at one web hosting without special domain name registration.

Could you describe your user scenario please?
It seems it can be a new feature of Ocelot, but with rare usage.

@raman-m raman-m self-requested a review May 18, 2023 21:34
@raman-m raman-m added proposal Proposal for a new functionality in Ocelot needs feedback Issue is waiting on feedback before acceptance waiting Waiting for answer to question or feedback from issue raiser labels May 20, 2023
@raman-m raman-m force-pushed the fix-upstream-host branch from a4a1e8b to c3d0484 Compare June 30, 2023 18:29
@raman-m
Copy link
Member

raman-m commented Aug 25, 2023

@grssmnn commented on Aug 19, 2021

Specifying different ports for Upstream of routes will be completely different Ocelot's feature. Would you like to open new discussion as an issue? 😉

But your small fix cares about the hostname...
Is it the problem?
How does it influence to your user scenario?

@raman-m raman-m added the bug Identified as a potential bug label Aug 25, 2023
RaynaldM
RaynaldM previously approved these changes Aug 28, 2023
@raman-m raman-m merged commit cc0b9b8 into ThreeMammals:develop Sep 29, 2023
@raman-m raman-m added accepted Bug or feature would be accepted as a PR or is being worked on and removed needs feedback Issue is waiting on feedback before acceptance waiting Waiting for answer to question or feedback from issue raiser labels Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Bug or feature would be accepted as a PR or is being worked on bug Identified as a potential bug proposal Proposal for a new functionality in Ocelot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants