Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 433 Bytes

README.md

File metadata and controls

21 lines (14 loc) · 433 Bytes

koa-cors-error

Module has fixed the bug when the system didn't send the 4xx or 5xx statuses through cross-domain requests. koa onerror method have been completely replaced.

Installation

$ npm install koa-cors-error

Use

var corsError = require('koa-cors-error');

app.post('/api/cors', cors, corsError, function *() {
  this.throw(401);
});