1.0.2 • Published 3 years ago

koa-isolated v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

koa-isolated

A koa middleware for Enabling cross-origin-isolation.

Cross-origin isolation enables a web page to use powerful features such as SharedArrayBuffer. If you want to use SharedArrayBuffer, performance.measureUserAgentSpecificMemory() or high resolution timer with better precision, you should enable cross-origin isolation.

The isolation need to set the header for Cross-Origin-Opener-Policy(CROP) and Cross-Origin-Embedder-Policy(COEP).

Installation

use npm

npm install koa-isolated

or use yarn

yarn add koa-isolated

Quick start

const Koa = require('koa');
const isolated = require('koa-isolated');

const app = new Koa();
app.use(isolated());

License

MIT