-
-
Notifications
You must be signed in to change notification settings - Fork 65
Compression middleware #342
Comments
we could/should also work together here and come up with a better API for HTTPResponseCompressor. I know @kjessup from Perfect also wants a better API here. |
@weissi we can enhance HTTPResponseCompressor API but that would not help here https://github.com/vapor/http/blob/master/Sources/HTTPKit/Server/HTTPServer.swift#L218, Currently, the HTTPResponseCompressor is at the core of vapor/http and what we want is to make Compression as Pugglable and Unplaggable. like,
and if we use enhanced HTTPResponseCompressor API in that case we need to pass config to the HTTPServerConfig and that would be really messy (-1 form me) |
@satishbabariya note that NIO's pipelines are mutable, so you can add and remove |
Yeah, that also an option but wouldn't it will require to pass compressor configurations through NIOServerConfig instead of the support compression flag, wouldn't it make more complications for the end user?, what's your take on this @tanner0101 |
I'd prefer to improve NIO's |
By introducing new Compression Middleware Package,
Example API
Currently vapor has only one config for compression "supportCompression: Bool" and HTTPResponseCompressor is i think quite lacking.
also this issue can be move to Vapor for further discussion.
The text was updated successfully, but these errors were encountered: