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

Merge Vary header #543

Open
sstepanchuk opened this issue Feb 5, 2025 · 0 comments
Open

Merge Vary header #543

sstepanchuk opened this issue Feb 5, 2025 · 0 comments

Comments

@sstepanchuk
Copy link

sstepanchuk commented Feb 5, 2025

Is this okay Vary header don't merge with Vary header from response (other layers)? each layer should add Vary header?

Here layers

let middleware_stack = ServiceBuilder::new()
        .layer(
            CorsLayer::new()
                .allow_origin(AllowOrigin::list(vec![
                    "http://test.com".parse::<HeaderValue>().unwrap(),
                    "http://example.com".parse::<HeaderValue>().unwrap(),
                ]))
                .allow_methods([Method::GET, Method::POST])
        )
        .layer(
            CompressionLayer::new()
                .quality(CompressionLevel::Best)
        );

Here resposne

HTTP/1.1 200 OK
content-type: application/json
vary: origin, access-control-request-method, access-control-request-headers
vary: accept-encoding
content-length: 109
date: Wed, 05 Feb 2025 17:45:27 GMT
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