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

Ensure CORS processing does not add Vary header twice on async requests #24223

Closed

Conversation

blackstorm
Copy link

@blackstorm blackstorm commented Dec 18, 2019

spring boot version 2.2.2

example

WebMvcConfigurer

CorsRegistration corsRegistration = registry.addMapping("/**")
                .allowCredentials(true);
corsRegistration.allowedHeaders("*")
                .maxAge(1800L)
                .allowedMethods(HttpMethod.GET.name(),
                        HttpMethod.POST.name(),
                        HttpMethod.PUT.name(),
                        HttpMethod.OPTIONS.name(),
                        HttpMethod.DELETE.name())
                .exposedHeaders("Content-Length");

controller

@RequestMapping("/test)
@RestController
public class ExampleController {
    @GetMapping
    public CompletableFuture<T> test() {
        // do something
    }
}

reponse headers

Vary | Origin
Vary | Access-Control-Request-Method
Vary | Access-Control-Request-Headers
Vary | Origin
Vary | Access-Control-Request-Method
Vary | Access-Control-Request-Headers

Ref #24222

@pivotal-issuemaster
Copy link

@blackstorm Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@blackstorm Thank you for signing the Contributor License Agreement!

@blackstorm blackstorm changed the title #24222 Fix async request cors interceptor repeat add Vary header. Fix async request cors interceptor repeat add Vary header. Dec 18, 2019
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Dec 18, 2019
@rstoyanchev rstoyanchev changed the title Fix async request cors interceptor repeat add Vary header. Ensure CORS processing does not add Vary header twice on async requests Dec 18, 2019
@rstoyanchev rstoyanchev self-assigned this Dec 18, 2019
@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Dec 18, 2019
@rstoyanchev rstoyanchev added this to the 5.2.3 milestone Dec 18, 2019
@rstoyanchev rstoyanchev added the for: backport-to-5.1.x Marks an issue as a candidate for backport to 5.1.x label Dec 19, 2019
@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.1.x Marks an issue as a candidate for backport to 5.1.x labels Dec 19, 2019
rstoyanchev added a commit that referenced this pull request Jan 6, 2020
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: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants