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

Symfony Responses break this Middleware #13

Open
goodevilgenius opened this issue Apr 9, 2018 · 0 comments
Open

Symfony Responses break this Middleware #13

goodevilgenius opened this issue Apr 9, 2018 · 0 comments

Comments

@goodevilgenius
Copy link

Occasionally, some controllers or middlewares will return a Symfony Response, rather than an Illuminate Response. When this happens, this Middleware fails due to calls to $rsp->header($headerName, $headerValue). This can be easily fixed by replacing these with $rsp->headers->set($headerName, $headerValue).

Additionally, for full coverage, you could also replace calls to $req->header($headerName) with $reg->headers->get($headerName) to cover the rare occasion when a Symfony Request is used as well (I haven't actually run into that issue, personally).

goodevilgenius pushed a commit to goodevilgenius/lumen-cors that referenced this issue Apr 9, 2018
gogl92 pushed a commit to StarfishCo/lumen-cors that referenced this issue Nov 4, 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