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

[Feature request] Customize Access-Control-Expose-Headers response values for different routes #26

Closed
yinheli opened this issue Sep 3, 2024 · 3 comments

Comments

@yinheli
Copy link

yinheli commented Sep 3, 2024

I have a requirement. The Access-Control-Expose-Headers response header has different response values on different routes. Currently, the cos.php configuration is uniformly configured, but I don't want to return redundant data like this. So I want to ask if there is any way to achieve this requirement?

Can I submit a PR to modify the method at https://github.com/fruitcake/php-cors/blob/master/src/CorsService.php#L261 so that it first obtains the Access-Control-Expose-Headers response header of $response and then responds by merging $this->exposedHeaders?

yinheli added a commit to yinheli/php-cors that referenced this issue Sep 4, 2024
)

- Update CorsService to merge existing exposed headers with configured
- Add deduplication for exposed headers
@yinheli
Copy link
Author

yinheli commented Sep 4, 2024

To better express on my thoughts, I submitted a PR. Please help with the review. If there are any better solutions, please point it out. Thanks.

@yinheli
Copy link
Author

yinheli commented Sep 10, 2024

Hi @barryvdh I want to gently follow up on this issue. Would you have some time to review it when you get a chance?

@yinheli
Copy link
Author

yinheli commented Sep 11, 2024

Hi @barryvdh. I have made adjustments to this issue again and submitted a Proposal and PR. If you have any suggestions, please leave a message in the PR or Proposal issue. I will close this duplicate issue. Thanks.

Proposal: #29
PR: #27

@yinheli yinheli closed this as completed Sep 11, 2024
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