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

Why are headers cleared at all by the middleware? #196

Open
luizen opened this issue Jun 1, 2023 · 0 comments
Open

Why are headers cleared at all by the middleware? #196

luizen opened this issue Jun 1, 2023 · 0 comments

Comments

@luizen
Copy link

luizen commented Jun 1, 2023

Hi,
I am working on some .NET 6 REST APIs and using your middleware for the sake of consistent ProblemDetails on errors.
We have strict requirements to follow ASVS recommendations when it comes to HTTP response headers. So we need to add some like "Referrer-Policy", "X-Content-Type-Options", "X-Frame-Options" and so on.
Then I found out that this middleware strips out all our custom headers. After that I managed to make it work again by adding those headers to the AllowedHeaderNames set.
I don't get why the middleware removes all headers by default (except by some pre-defined). Could you please explain?
Thanks

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

No branches or pull requests

1 participant