laravel-weak-etag-middleware maintained by moafak
Description
A Laravel middleware to add weak etags to HTTP response headers
Author
Last update
2018/03/28 21:25
(dev-master)
License
Downloads
11
Tags
laravel-weak-etag-middleware
A Laravel middleware for adding Weak ETags to HTTP requests to improve response times
Weak Etag vs Strong Etag
Etag is a digest of the response content, usually with a hashing function.
Strong etag means the content of the response is byte-for-byte identical.
While weak etag means the content is symantically identical.
Example of strong etag: "f9bba821aec5e6b4607597cb500898f7"
Example of weak etag: W/"f9bba821aec5e6b4607597cb500898f7"
Refer to the blog post for more info.
Installation
Run the following command to install the package:
composer require moafak/laravel-weak-etag-middleware
Then just include this in your app/Http/Kernel.php in the appropriate place where you want to import the middleware:
\moafak\WeakETagMiddleware\WeakETag::class