Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vapor-community/gzip-provider
gzip support for Vapor
https://github.com/vapor-community/gzip-provider
Last synced: 3 months ago
JSON representation
gzip support for Vapor
- Host: GitHub
- URL: https://github.com/vapor-community/gzip-provider
- Owner: vapor-community
- License: mit
- Created: 2016-08-21T13:32:59.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-15T22:17:28.000Z (about 8 years ago)
- Last Synced: 2024-05-18T22:51:52.600Z (6 months ago)
- Language: Swift
- Size: 18.6 KB
- Stars: 21
- Watchers: 8
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- TheList - Vapor gzip
README
# gzip-vapor
[![Build Status](https://travis-ci.org/vapor/gzip-provider.svg?branch=master)](https://travis-ci.org/vapor/gzip-provider)
![Platforms](https://img.shields.io/badge/platforms-Linux%20%7C%20OS%20X-blue.svg)
![Package Managers](https://img.shields.io/badge/package%20managers-SwiftPM-yellow.svg)> gzip support for Vapor
# Usage
When setting up your Vapor Droplet, just add this line for the server to automatically send responses gzipped (if the client declares support for it).
```swift
drop.middleware.append(GzipServerMiddleware())
```(Also contains a `GzipClientMiddleware` for when Vapor support `Client` middlewares.)
# Installation
## Swift Package Manager
```swift
.Package(url: "https://github.com/czechboy0/gzip-vapor.git", majorVersion: 0, minor: 3)
```:gift_heart: Contributing
------------
Please create an issue with a description of your problem or open a pull request with a fix.:v: License
-------
MIT:alien: Author
------
Honza Dvorsky - http://honzadvorsky.com, [@czechboy0](http://twitter.com/czechboy0)