@manzano/etag-middleware
v1.0.4
Published
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/manzano78/etag-middleware/ci.yml?style=flat-square) [![npm version](https://img.shields.io/npm/v/@manzano/etag-middleware.svg?style=flat-square)](https://www.npmjs.com/package
Downloads
6
Readme
etag-middleware
ETag header middleware based on standard Request and Response.
It will be able to be used in future Remix middlewares (RFC).
Runtimes compatibility: Node, Deno & Bun 🚀
I'll eventually support Cloudflare as well later
Installation
# NPM
npm install @manzano/etag-middleware
# YARN
yarn add @manzano/etag-middleware
Requires node >= 18 or Bun
Usage
// root.tsx (Remix route module)
import { etag } from '@manzano/etag-middleware';
export const middlewares = [
etag({
// mime types to process (required)
mimetypes: ['application/json', 'text/html'],
}),
// ... other middlewares
];