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

Stack middleware causes loss of existing Vary headers #60

Closed
mglaman opened this issue Jan 9, 2020 · 1 comment
Closed

Stack middleware causes loss of existing Vary headers #60

mglaman opened this issue Jan 9, 2020 · 1 comment

Comments

@mglaman
Copy link

mglaman commented Jan 9, 2020

If you have already set the Vary headers, it may be an array.

        if (!$response->headers->has('Vary')) {
            $response->headers->set('Vary', 'Origin');
        } else {
            $response->headers->set('Vary', $response->headers->get('Vary') . ', Origin');
        }

This tries to perform string concatenation on an array, resulting in the Vary header always be , Vary.

@mglaman
Copy link
Author

mglaman commented Jan 9, 2020

Nevermind, apologies. Something is causing the first value in the parameter bag to be null,

@mglaman mglaman closed this as completed Jan 9, 2020
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