moafak/laravel-weak-etag-middleware

This package is abandoned and no longer maintained. No replacement package was suggested.

A Laravel middleware to add weak etags to HTTP response headers

v1.0.0 2018-03-28 19:25 UTC

This package is not auto-updated.

Last update: 2023-06-30 15:02:05 UTC


README

A Laravel middleware for adding Weak ETags to HTTP requests to improve response times

Build Status Coverage Status

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