Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

moafak/laravel-weak-etag-middleware

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-weak-etag-middleware

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

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%