Feature Request: allow to customize compression middleware on server creation
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1.3k
- Forks
- 103
- PR merge metrics
- No merged PRs in 30d
Description
As already stated in another issue https://github.com/amphp/http-server/issues/324 , it may be convenient to customize the way the compression is done by the middleware.
That's why not having the ability to customize the middleware anymore is something awkward in the builder of the SocketHttpServer::createForDirectAccess() method. It leads to an entire copy/paste of this method when you want to customize only a property of the compressor.
I think it would be great to find a more convenient way. 🙏
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with SocketHttpServer::createForDirectAccess() and read the related discussion in issue #324. Trace how the compression middleware is configured during server creation and determine an API that allows its properties to be customized without copying the whole method. Done means callers can customize compression behavior through the builder.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100