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

NettyHeadersAdapter may be cause Cors problem #28358

Closed
scuhzq opened this issue Apr 20, 2022 · 1 comment
Closed

NettyHeadersAdapter may be cause Cors problem #28358

scuhzq opened this issue Apr 20, 2022 · 1 comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: invalid An issue that we don't feel is valid

Comments

@scuhzq
Copy link

scuhzq commented Apr 20, 2022

1、version:
org.springframework:spring-web:jar:5.3.18:compile
org.springframework.cloud:spring-cloud-starter-gateway:jar:3.1.1:compile
2、core case:
NettyRoutingFilter use the:【NettyHeadersAdapter#putAll】but【this.headers::add switch to this.headers::set】
image
image
3、eg:
gateway server:set the Access-Control-Allow-Origin:http://gateway.com
gateway NettyRoutingFilter:return another Access-Control-Allow-Origin:http://upstream.com
NettyHeadersAdapter#putAll:rewrite the Access-Control-Allow-Origin to:http://upstream.com

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 20, 2022
@bclozel
Copy link
Member

bclozel commented Apr 20, 2022

This is by design, see #27887

@bclozel bclozel closed this as completed Apr 20, 2022
@bclozel bclozel added in: web Issues in web modules (web, webmvc, webflux, websocket) status: invalid An issue that we don't feel is valid and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

3 participants