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

Allow multiple secure middlewares to operate independently #6604

Merged
merged 3 commits into from
Jul 1, 2020

Conversation

dtomcej
Copy link
Contributor

@dtomcej dtomcej commented Mar 30, 2020

What does this PR do?

Utilizes the secureContextKey to allow different header middlewares to operate independently, without overwriting the next middleware's context key.

Motivation

Fixes #5538

More

  • Added/updated tests
  • Added/updated documentation - none needed, bugfix

Additional Notes

Because unrolled/secure uses a private secureContextKey type for storage, we cannot retrieve from this project. Testing this drills down to the base secure project, which is already tested in their repo.

Therefore integration testing I feel is the best option at this point.

@mpl
Copy link
Collaborator

mpl commented Jun 5, 2020

Moving to needs-review as requested by @rtribotte

Copy link
Member

@rtribotte rtribotte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@juliens juliens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@jbdoumenjou jbdoumenjou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@traefiker traefiker merged commit 73513f8 into traefik:master Jul 1, 2020
v2 automation moved this from To review to Done Jul 1, 2020
@SuperSandro2000
Copy link
Contributor

Can we get this back ported to 2.2.X? It seems like 2.3.0 is still a bit away and I would really like to get this bug fix to not duplicated my headers 50 times.

@ldez ldez modified the milestone: 2.3 Sep 6, 2020
@ldez
Copy link
Member

ldez commented Sep 6, 2020

This PR was merged in the wrong branch, it was a mistake, we already back ported this PR inside another PR: https://github.com/containous/traefik/pull/7230/commits
It's a part of the v2.2.10, but there is a bug with headers middleware in this version #7250

We will release a v2.2.11 tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v2
Done
Development

Successfully merging this pull request may close these issues.

Multiple middlewares of the same type overwrite each other in unexpected ways
8 participants