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

Global UpstreamHeaderTransform settings in GlobalConfiguration section #1658

Open
marklonquist opened this issue May 25, 2023 · 10 comments · May be fixed by #1659
Open

Global UpstreamHeaderTransform settings in GlobalConfiguration section #1658

marklonquist opened this issue May 25, 2023 · 10 comments · May be fixed by #1659
Assignees
Labels
accepted Bug or feature would be accepted as a PR or is being worked on Dec'24 December 2024 release feature A new feature Headers Transform Ocelot feature: Headers Transformation
Milestone

Comments

@marklonquist
Copy link

marklonquist commented May 25, 2023

New Feature

Add UpstreamHeaderTransform globally for all routes.

Motivation for New Feature

Currently we have to set the same transforms on all routes, leaving a lot of copy paste work.

"UpstreamHeaderTransform": {
    "X-Forwarded-For": "{RemoteIpAddress}",
    "X-Forwarded-Host": "{BaseUrl}",
    "X-Forwarded-Proto": "https"
}

A solution would be to also set global transforms in GlobalConfiguration

Related to

Feature: Headers Transformation

@raman-m raman-m added feature A new feature medium effort Likely a few days of development effort proposal Proposal for a new functionality in Ocelot labels May 26, 2023
@raman-m raman-m changed the title Global UpstreamHeaderTransforms Global UpstreamHeaderTransform settings in GlobalConfiguration section May 26, 2023
@raman-m
Copy link
Member

raman-m commented May 26, 2023

Hi Mark!

Thanks for paying your attention to this per Route feature.
Yes, I agree, it makes sense to have Headers Transformation on the global level for all routes.

Do you have some preliminary solution? Did you fork the Ocelot repo?
So, I have assigned this issue to you because I expect most active communication and collaboration on that feature.

If you've seen someone's solution, just let me know about please!

@raman-m
Copy link
Member

raman-m commented May 26, 2023

@raman-m raman-m added question Initially seen a question could become a new feature or bug or closed ;) waiting Waiting for answer to question or feedback from issue raiser labels May 26, 2023
@marklonquist
Copy link
Author

I do not currently have a solution for it no, but I'd say it would be pretty easy to implement.

Could be a new DefaultUpstreamHeaderTransform and DefaultDownstreamHeaderTransform on the GlobalConfiguration object.

Then, if there is a header transform set on a route which is also a default, that would "win" over the default one (so you can override specific headers on specific routes).

@marklonquist marklonquist linked a pull request May 26, 2023 that will close this issue
@marklonquist
Copy link
Author

Added a PR

@raman-m raman-m removed question Initially seen a question could become a new feature or bug or closed ;) waiting Waiting for answer to question or feedback from issue raiser labels May 29, 2023
@raman-m raman-m linked a pull request May 29, 2023 that will close this issue
@raman-m
Copy link
Member

raman-m commented Jun 1, 2023

👌 I believe this local-to-global feature enhancement will be useful for the Ocelot community.
So, I'm going to accept this feature request... ✔️

@raman-m raman-m added the accepted Bug or feature would be accepted as a PR or is being worked on label Jun 1, 2023
@raman-m raman-m removed the proposal Proposal for a new functionality in Ocelot label Sep 8, 2023
@raman-m
Copy link
Member

raman-m commented Sep 8, 2023

The issue has been accepted due to open PR #1659

@raman-m raman-m removed the medium effort Likely a few days of development effort label Sep 8, 2023
@xuanhe168
Copy link

xuanhe168 commented Nov 17, 2023

Is it solved? I urgently need this feature

@raman-m
Copy link
Member

raman-m commented Nov 17, 2023

@mingyouzhu commented on Nov 17

Hi 老中医 !
Linked PR #1659 is mostly ready. We need to update docs only and/or polish the code.
This feature can be added to Nov'23 release. I'll discuss with the team... Sounds good?
Sorry, we don't make "urgent" releases!
As an urgent solution you can clone marklonquist forked repo, checkout feature branch and compile it.

@raman-m raman-m added the 2023 Annual 2023 release label Dec 2, 2023
@raman-m raman-m added this to the December'23 milestone Dec 2, 2023
@raman-m raman-m added the Headers Transform Ocelot feature: Headers Transformation label Feb 17, 2024
@spaduret
Copy link

Any ETA to release this feature?

@raman-m
Copy link
Member

raman-m commented Mar 2, 2024

@spaduret
This PR was added to Annual 2023 release. Watch the progress please!
Sorry, it cannot be released so fast as you/community want/s.

@raman-m raman-m added Oct'24 October 2024 release and removed 2023 Annual 2023 release labels Oct 9, 2024
@raman-m raman-m removed this from the Annual 2023 milestone Oct 9, 2024
@raman-m raman-m added this to the October'24 milestone Oct 9, 2024
@raman-m raman-m added Dec'24 December 2024 release and removed Oct'24 October 2024 release labels Oct 26, 2024
@raman-m raman-m modified the milestones: October'24, Autumn'24 Oct 26, 2024
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 Dec'24 December 2024 release feature A new feature Headers Transform Ocelot feature: Headers Transformation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants