1.0.4 • Published 6 months ago
@manzano/etag-middleware v1.0.4
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
];