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

Consider dropping custom CorsMiddleware in favor of mezzio/mezzio-cors package #877

Closed
acelaya opened this issue Oct 31, 2020 · 1 comment · Fixed by #948
Closed

Consider dropping custom CorsMiddleware in favor of mezzio/mezzio-cors package #877

acelaya opened this issue Oct 31, 2020 · 1 comment · Fixed by #948
Milestone

Comments

@acelaya
Copy link
Member

acelaya commented Oct 31, 2020

It will first require adding some API tests that check the requests headers are handled as expected. Then, add the new package, and verify everything continues working as before.

https://github.com/mezzio/mezzio-cors

@acelaya acelaya added this to the 2.5.0 milestone Nov 22, 2020
@acelaya
Copy link
Member Author

acelaya commented Dec 31, 2020

After some testing with the component, two main issues arised.

  • It tries to match routes internally, which doesn't work as expected when the middleware is piped for subpaths only. I'll consider reporting this.
  • It doesn't allow to set header values dynamically, which is used by shlink in some scenarios.

It has allowed me to understand some edge cases better, which in turn allows to improve project's custom middleware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant