A Laravel middleware for adding Weak ETags to HTTP requests to improve response times
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.
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