Skip to content
Middleware for SlimPHP to compress responses
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
composer.json

README.md

SlimPHP Compression Middleware

Need to add gzip compression to your output but don't have access to the server configuration? This is a middleware for SlimPHP Framework to use HTTP+gzip compression.

Please note: If you CAN add this functionality to your server config, please do that instead.

Installation Instructions

Install the latest version with

$ composer require aaronsaray/slimphp-compression-middleware

Usage Instructions

$app = new \Slim\Slim();
$compressMiddleware = new \AaronSaray\SlimPHPMiddleware\Compress();
$app->add($compressMiddleware);
You can’t perform that action at this time.